Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
submodel [2016/09/22 02:36]
127.0.0.1 external edit
— (current)
Line 1: Line 1:
-===== Sub Model ===== 
- 
-//Sub Model// is a model which can be included in other models. The use of // sub model// enables sharing and re-use of models that are built to describe common behaviors. 
- 
----- 
-==== Embedding Sub Model==== 
-//Sub Model// is embedded into a state. To embed a //Sub Model//, open [[statenode | State Property]] and select the sub model from the dropdown list for the field labeled //Sub Model//. 
- 
-To remove the sub model, just select blank option from the sub model dropdown list. 
- 
-The model must be saved and re-open in order to bring in all of the entire sub-model content: states, transitions and mscripts.  This should be done automatically when you embed the sub model. If not, you can manually save the model changes, close the model and re-open it. 
- 
----- 
-==== Create A Sub Model====  
- 
-//Sub Model// is a model itself.  It becomes a //Sub Model// if its model name contains a prefix **_sub** (underscore). For example //_sub_mySubModel//. 
- 
-To create a sub model, create a model and name the model with the prefix "_sub". 
- 
----- 
-==== Sub Model Characteristic==== 
- 
-//Sub Model// must have an initial state and one or more final states.  When //Sub Model// is embedded in another model, it's connected with the states of the main model through the initial state and final states. 
- 
-Initial state is used as an entry point from the model to step into the //Sub Model// while the final states are the exits from //Sub Model// back out to the main model. 
- 
-For each final state in the //Sub Model//, there must be an outgoing transition from the //sub-model state// (the state which the sub model is embedded in) that is set to be connected to the final state.  This is done by setting the //SubModel Final State// attribute for the outgoing transition to be the id of the final state of the sub model in [[transnode || Transition Property]]. 
- 
-Sub model should not be renamed or deleted unless it is not referenced by any models. 
- 
----- 
-==== Sub Model Display==== 
-//Sub Model// by default is displayed inside the state in which the sub model is embedded.  In some situation you may wish to hide the sub model for brevity or to reduce the model size. 
- 
-To hide sub model in the model editor, select //Hide Sub Model// from the state context menu.  You can un-hide the sub model by selecting //Show Sub Model//. 
- 
-Hiding sub model from the [[modelingtab | Model Editor]] automatically hides the sub model in the model graphs.