Rerunning a Simulation without Further Compiling
Use the Rerun Simulation feature in MapleSim to rerun your simulation without having to recompile the entire model. This capability significantly reduces the time required to update and test changes to parameters and initial conditions (ICs), making your workflow more efficient.
Initial Simulation
First, use the Parameter Block on your workspace to define the parameters that you would like to be able to adjust when you rerun your model. Ensure that that Make Parameters Available for Rerun is selected. For more information, see tasks,building,parameterSets,usingParameterBlocks
Next, click Play (
) to build and simulate the model.
When you first run your model, MapleSim performs two main tasks:
1.
|
Constructing the Simulation Model, which involves compiling the code and generating the necessary equations.
|
2.
|
Integrating the Simulation Model and Event Handling.
|
After these processes are complete, MapleSim automatically creates a rerun module, which you can reuse after the model has finished its simulation run.
Rerun Simulation Process
After the initial simulation, you can then use the rerun module. This module allows you to rerun the simulation using the previously built model, avoiding the need for a full recompilation.
To use the Rerun Simulation feature:
1.
|
Click Show Rerun Panel (
) in the main toolbar to open the Rerun Simulation panel.
|
2.
|
In the Rerun Simulation panel, you can modify parameters and initial conditions that have been defined and exposed to the rerun module.
|
Note: Only parameters within Parameter Blocks with Make Parameters Available for Rerun set to true can be adjusted here.
3.
|
After making changes, click Rerun (
) in the panel to re-initialize (if necessary) and rerun the simulation with the new parameter values. The simulation uses the previously built model, allowing for quick feedback and iterative tuning.
|
Notes:
•
|
If you alter parameters or ICs at the main level of the model (outside the rerun module), you must rerun the entire simulation to generate a new rerun module that includes these changes.
|
•
|
You can save your simulation settings within the Rerun Simulation panel, make further adjustments, and rerun the simulation multiple times to iteratively refine your model.
|
|