Main Content

模型统计Available when Using the Partitioning Solver

如果您的模型使用分区本地解算器,则统计查看器包含特定于此求解器类型的其他统计信息:

  • Number of partitions- 此统计信息表示模型中的分区总数。展开此节点时,您可以查看下面列出的其他统计信息。

  • 全内存估计- 此统计信息表示使用穷举分区存储方法时,在KB中为该模型的内存使用情况估计。

  • 附加节点,命名Partition1Partition2等等,直到模型中的分区总数。对于这些节点中的每一个,Value列列出应用于此分区的集成方法。可能的方法是前进欧拉(显式)和后向欧拉(隐式)。对于每个分区节点,您也可以查看:

    • Equation type- 这Value此统计列列出分区中方程的类型。可能的类型是线性时间不变,切换线性和线性时变。

    • 变量数量- 此统计信息表示分区中的标量变量的数量。当您选择此节点时,来源统计查看器的一部分列出了根据此统计数据下降的所有变量。对于每个变量,Source列包含变量的完整路径,从顶级模型开始,具有与相关块的链接。如果单击链接中的链接Source列,在框图中突出显示相应的块。这Valuecolumn contains the name of the variable, as it would appear in the初始目标块对话框的一部分。

    • 方程数- 此统计信息表示分区中的标量方程数。提供方程的来源,如果有的话。当您选择此节点时,来源section of the Statistics Viewer lists all the blocks that provide the equations. If the block source code is available (that is, not protected), clicking the link in theSource列在Matlab中为此块打开Simscape™源文件®编辑器,指向适当的等式。

    • Number of modes- 如果是Equation type是线性时间不变或切换线性,此统计信息表示分区中的模式数。每一个如果andelsef.Simscape源代码中的语句对应于模式。通常,当将隐式集成方法应用于分区时,存在的模式越多,可能需要更多的迭代来解决该分区的方程。

    • 配置数量——这个数据代表di的总数fferent systems of linear equations that need to be solved when simulating the partition. In the linear time-invariant or switched linear cases, this is 2^N., 在哪里N.is the number of modes in the partition. To accelerate computation, decompositions of some systems are cached for each set of modes (thePartition storage methodparameter in the Solver Configuration block defines how the decompositions are cached). If this number exceeds the greatest possible supported unsigned integer value, theValue该统计显示的列溢出

    • 记忆估计— This statistic represents the estimate for memory usage, in kB, for this partition when using the exhaustive partition storage method.

Estimate the Memory Budget for Exhaustive Partitioning Storage

此示例显示如何使用统计器查看器来估计模拟使用分区解算器的模型所需的内存预算。

  1. 打开永磁直流电机示例模型。

  2. 双击求解器配置块,选择使用本地求解器复选框,然后设置求解器类型Partitioning

  3. 要查看模型统计信息,请在模型窗口中Debug选项卡,单击Simscape>Statistics ViewerClick the刷新button in the toolbar of the viewer window, if necessary, to populate the viewer with data.

  4. 展开Number of partitions节点。

    全内存估计统计信息表示此模型的内存用法估计为3 kB。当您使用详尽的分区存储方法时,为分区存储分配的默认内存预算为1024 kB。因此,默认内存预算值足以模拟此模型,如果需要,您甚至可以减少它。

    If the memory estimate is unexpectedly large, you can investigate further by expanding each of the individual partition nodes and checking the记忆估计该分区的价值。

也可以看看

Related Topics