Testing the Model¶
Choose initial states that make the prediction of the system’s reaction easy and compare them with the simulation results. After successfully starting the program, you will see the interface of the toolbox as shown in Fig. 3.
Within the Properties Window (1), double clicking on a value (all None
by default)
activates a drop down menu.
Clicking again presents all eligible options.
One of these options now is PendulumModel
,
since it was registered to PyMoskito earlier.
Choose it now and press enter to confirm your choice.
By clicking on the arrow that appeared on the left of Model
,
all model parameters and the initial state are displayed.
These are taken from the public_settings
which have been defined earlier in the model.
Double click on a value to change it manually.
Press enter to confirm the input.
Choose the PendulumModel
, the ODEInt
as Solver
and the AdditiveMixer
as ModelMixer
.
Change the initial state of Model
to [0, 100, 0, 0] and the end time of Solver
to 20 as shown in Fig. 4.
Click the gearwheel button (2), use the drop-down menu (3) or press F5 to start the simulation. After a succesful simulation, all created diagrams will be listed in the Data Window (4). Double click on one to display it as shown in Fig. 5.
Feel free to experiment with the properties and see, if the model reacts the way you would have predicted. After testing the model class, a controller shall be implemented.