Implementations

Navigation:  Editor > Using Models >

Implementations

Previous pageReturn to chapter overviewNext page

A model may have various implementations. It means that you can combine several versions of a model and store them in one file. If you drag and drop a model with implementations, 20-sim will ask which one to use.

Example

A fine example of a model with various implementations is the model MachineDynamics.emx from the Examples\1D mechanics library. This example model has several submodels with implementations:

 

SpringDampers
SignalGenerator-Sweep

Implementations

The selected implementation is shown between brackets in the Model Browser.

When you drag and drop a model with implementation into the Graphical Editor you will be asked which implementation to use. In the Model Browser, the chosen implementation is shown between brackets (Default and ZeroMean in the picture above). If you hover the mouse above a submodel with an implementation, you also see the chosen implementation between brackets. While modeling, you may decide to change the implementation. This can easily be done by selecting the submodel and clicking the right mouse menu. Choose Implementation and select the implementation that you want to use.

Construction

You can make submodels with implementations yourself:

1.Select a submodel.
2.From the right mouse menu choose Edit Implementation and Add New.
3.Enter the name of the implementation and click OK.
4.Store the submodel using the Save Submodel command of the File menu.

Changes

You can change the implementation:

1.Select the submodel.
2.From the right mouse menu choose Edit Implementation and select the implementation that you want to change.
3.Make the changes that you want in the submodel.
4.Store the submodel using the Save Submodel command of the File menu.