On this page
Magic Model Analyst supports rollup calculations of total mass, cost, power, and another system dimension, based on individual values of all the parts in the model. Please refer to Rollup Pattern Wizard, applying Rollup Pattern Blocks, and LaptopCostAnalysis and SpacecraftMassRollup built-in samples for more details.
Simulation with a built-in rollup pattern
The LaptopCostAnalysis sample applies built-in CostRollUpPattern. The sample uses the Cost Analysis Block with the Laptop context Block as the Part. Optionally, you can add any constraint (maxCost) and Requirement (Total cost) and use a Parametric diagram to connect them as shown in the figure below.
The Cost Analysis Block containing the Laptop context Block applied with built-in CostRollUpPattern as the Part.
You can also either run the simulation through the Cost Analysis Block directly or use a SimulationConfig with executionTarget = the Cost Analysis Block. The result will be shown in the totalCost context Block, e.g., 220 (80+50+90) as shown in the figure below.
The totalCost context Block as the result of Laptop cost analysis applied with CostRollUpPattern.
Simulation with a custom rollup pattern
The SpacecraftMassRollup sample applies a custom rollup pattern through the same applying Rollup Pattern Block like the built-in one but requires selecting a Pattern Block for the custom rollup pattern, e.g., Component. The Component Pattern Block uses value type properties binding with 5 constraint properties in the Parametric diagram as shown below.
A Parametric diagram of the Component custom rollup pattern as a Pattern Block.
Optionally, you can add any constraint (less) and Requirement (Estimated mass), and then run the spacecraft mass analysis SimulationConfig with the executionTarget as an instance of the spacecraft to run. The result of evaluation, according to the me < ma rule, will be highlighted at me : mass[kilogram] for each component shown on the right side in the Block Definition diagram as shown below.