How to invoke AMALTHEA model migration
Simple migration
An attempt to open an older model file in the model editor will show the following dialog.
The default button will simply migrate the selected file ...
- provided it doesn’t have any references (only allowing single file migration)
- the original file is renamed (the version string is added, e.g. “model_0.9.2.amxmi”)
- a log file with the current date is created (e.g. “ModelMigration__2019-07-30_15_43_44.log”)
Migration dialog
AMALTHEA model migration utility is developed as a eclipse plugin and it is part of APP4MC distribution (
from release 0.7.0)
Model migration utility can be invoked by selecting the required models to be migrated in the UI and specifying the target AMALTHEA version to which models should be migrated
-
Step 1: Selection of AMALTHEA models
-
Step 2: Opening AMALTHEA Model Migration dialog and configuring migration inputs
On click of AMALTHEA Model Migration action, selected files are parsed and the following information is retrieved:
- AMALTHEA model version to which model is belonging to
- Referred AMALTHEA models inside the selected model (
i.e. case of cross document references)
- AMALTHEA model version to which these models are belonging to
Once the above information is successfully retrieved, following Model Migration dialog is opened:
Model Migration dialog consists of following information:
- Selected AMALTHEA model files : These are the models which are explicitly selected by the user
- Model scope files : These are the model files which are referred in the models explicitly selected by the user
Example: In the dialog shown above, mapping.amxmi is the file selected by the user, and it contains references to the model elements of : sw.amxmi, sw.amxmi-sw, default.amxmi-os. Due to this reason, all these referred models are selected implicitly for model migration
Note:
In case if the selected/referred models are having the different AMALTHEA model versions, migration can not be proceeded and the following error dialog is displayed
- Input model version : This is the AMALTHEA model version to which both selected & referred models are belonging to
- Output model version : This is the AMALTHEA model version to which both selected & referred models should be migrated to
- Output directory : This is the location where migrated AMALTHEA models should be generated.
Once the required parameters are configured in the model migration dialog, click on “Migrate Models” button in the dialog to invoke migration.