Static Simulation Tutorial
To demonstrate static simulation in Modeler, we consider a joke that was quite popular in Italian primary schools.
The joke consisted of asking a kid to think of an arbitrary number, and then performing certain mathematical computations on it. Then, the kid is told the answer to his calculations without the kid having declared the initial number.
The mathematical calculations are:
1. Think of a number — (let the number be x).
2. Double the number — (2x).
3. Add six — (2x + 6).
4. Divide by 2 — ((2x + 6)/2).
5. Subtract the original number from the result (((2x + 6)/2) – x).
6. The answer is 3 (always).
Prerequisites
For this tutorial, ensure the following:
You must use a 64–bit OS.
You must install and license Phoenix ModelCenter 13, Analysis Server 13, and Model Center MBSE 2.0.
You must extract the two folders (joke and validators, available in the “Analyses.zip” file that you can download from PTC support) to:
C:\Users\<current user name>\AppData\Roaming\Phoenix Integration\AServer13\analyses
Tutorial
1. Create a new model “PrimarySchoolJoke” with the SySim profile.
2. If possible, move all profiles to a “Profiles” package (this may require unlocking of profiles).
3. Create a new package “TheJoke” and a subpackage “Constraints”.
4. Under “TheJoke”, create a block “TheSystem”.
5. Under “Constraints”, create two Constraint Blocks, each with “A”, “B” and “R” parameters, typed by Real.
6. Stereotype both the constraint blocks with <<MC Analysis>>.
7. For the constraints blocks, access the “MC Analysis” tab and set the tag definition “MC Path” of the two constraints to:
aserv://localhost/joke/Adder, for Add
aserv://localhost/joke/Multiplier, for Multiply
8. Under “TheJoke”, create a BDD. Drag “TheSystem” into it. On “TheSystem”, create two Block Properties typed by Real, “AnyNumber” and “Result”. Set the value of “AnyNumber” to (for example) 14.
9. Under “TheSystem”, create a Parametric Diagram.
10. Drag “AnyNumber” and “Result” onto the diagram.
11. Also, drag “Multiply” 3 times and “Add” 2 times onto the diagram, creating constraint properties corresponding to the constraints. Assign names to the constraint properties as displayed in this parametric diagram:
Also, show the constraint parameters for each constraint property, and then connect the properties as displayed in the diagram.
12. Set the <<MC DefaultParameter>> stereotype for parameter “B” of the Add and Multiply constraints, and set the “MC Direction” to “In”.
13. Set the default values of the “B” parameters of the constraint properties by selecting each parameter on the diagram. This causes Modeler to create redefinitions for each property’s parameter. (Disregard the “MC Value” tag definition. This will be removed from future releases).
14. Set the default values for parameters as displayed in the callout notes.
15. Under “TheJoke”, create a “Requirements” package. Create a Requirements Diagram in that package. Create a Requirement and name it “JokeRequirement”. This requirement validates our calculation.
16. Apply <<MC Requirement>> to the requirement, then set the properties indicated in the diagram, Description, “MC ComparisonOp”, “MC ValueMin” and “MC ValueMax”.
17. Drag the “Result” block property onto the diagram and connect it to the requirement with a <<satisfy>> dependency.
18. Right click on “TheSystem” and select “Perform Static Analysis”. Model Center MBSE now starts.
19. Double-click on “TheSystem” in the “Workspace Explorer” (located top-left of Model Center MBSE).
20. Click the Run button.
21. Wait until the analysis ends, and confirm the JokeRequirement has been satisfied.
22. Click Save and accept the default name.
23. Close ModelCenter MBSE and do not save when prompted.
24. In Modeler, press F5, and in the Parts browser, confirm the system property’s result has the default value of 3.
25. Locate the Requirement. Confirm its tag definition “MC IsSatisfied” is True and “MC Margin” is about 10-3.