-
Notifications
You must be signed in to change notification settings - Fork 6
Instructions to install and execute the roundtrip SysML Modelica transformation
-
Install the OpenModelicaCompiler revision- 12060 (1.8.1). Newer versions of OMC exist but have not been tested. OpenModelicaCompiler revision- 12060 for Windows can be found at: https://build.openmodelica.org/omc/builds/windows/nightly-builds/older/OpenModelica-revision-12060.exe. Install it under C:\ since there may be some problems if you install it somewhere else.
-
Create the OPENMODELICA Environment variable if it has not been created through the installation of the OpenModelicaCompiler. On Windows 7, Start->Control Panel->System and Security-> Advanced System Settings->Environment Variables. Define OPENMODELICAHOME to point to drive:\path\to\your\OpenModelica-X.Y.Z\ (e.g. C:\OpenModelica1.8.1). Restart your computer.
-
Install any Eclipse environment from http://www.eclipse.org/downloads/ (e.g. the Eclipse IDE for Java Developers package or the Eclipse Modeling Tools package)
-
Install EGit to checkout the edu.gatech.mbse.mdsysmlmodelica project from GitHub. In Eclipse, click Help → Install New Software. In the Install window, in the Work with field paste in the following: http://download.eclipse.org/egit/updates Click Add…. In the Add Repository window, in the Name field, type something memorable like EGit, then click OK. Select Eclipse Git Team Provider and click Next. On the Install Details page, click Next. On the Review Licenses page, review the license, select I accept the terms of the license agreement and click Finish. After EGit installs, on the Software Updates window click *Yes to restart Eclipse.
-
Checkout the edu.gatech.mbse.mdsysmlmodelica project from GitHub. In Eclipse, open the Git Repositories view. (Window → Show View → Other, search for Git repo and click OK.) Click Clone a Git Repository. In the Clone Git Repository window, in the URI field paste the following: https://github.com/SysMLModelicaIntegration/edu.gatech.mbse.mdsysmlmodelica. The Host and Repository fields will autofill. Add your Username and Password. Click Next. On the Branch Selection page, select master and click Next. For the Destination, select a folder for the files or accept the default of your Eclipse workspace. Click Finish. edu.gatech.mbse.mdsysmlmodelica will appear in the Git Repositories view. In the Git Repositories view, right-click edu.gatech.mbse.mdsysmlmodelica and click Import Projects. In the Import Projects from Git Repository wizard, select Import existing projects and click Next. Select all components of edu.gatech.mbse.mdsysmlmodelica (this is the default) and click Finish.
-
Add MagicDraw jars to the buildpath in the correct order. Right-click on edu.gatech.mbse.mdsysmlmodelica project ->Build Path-> Configure Build Path… select the menu tab “Libraries”. Add all the MagicDraw-specific jars which are located in lib folder of the MagicDraw installation directory (for example at C:\Program Files\MagicDraw UML\lib). IMPORTANT: first add patch.jar and then all the other MagicDraw jars and also add the jars under \lib\webservice and under \lib\graphics
-
Add JVM arguments to the _RunMagicDraw _class. In the Eclipse environment, go to the Run->Run Configurations… menu. Select the “Java Application” tab and then the “New Launch Configuration” button at the top left with the icon displaying a blank sheet and a plus sign in the corner. Give a unique name to the launch configuration like “RunMagicDraw” at the top. Select as “Main Class” the Java class _RunMagicDraw _in the edu.gatech.mbse.mdsysmlmodelica.magicdraw package. Next, go to the “Arguments” tab and add in the “VM Arguments” field the following arguments: -Xmx1000M -XX:PermSize=40M -XX:MaxPermSize=300M -Duser.language=en -DLOCALCONFIG=false. Otherwise, MagicDraw won’t be able to start with enough memory and will crash.
-
Run the RunMagicDraw launch configuration. MagicDraw will start as if a user had started it manually.
-
Disable plugin "Caliber Integration" if available through Options->Environment->Plugins. Otherwise, there will be a problem with the Corba connection that OMC needs to set up.
-
Import the SysML4Modelica profile as a module within a new and empty MagicDraw SysML project. Option A: Open the SysML project named ModelicaImportTest.mdzip in MagicDraw. The ModelicaImportTest.mdzip project is located in edu.gatech.mbse.mdsysmlmodelica\org.gt.mbse.mdsysmlmodelica\MagicDraw Projects folder. The empty SysML project already references the the SysML4Modelica profile which is located in the folder. Option B: Create a new SysML project in MagicDraw (if possible with MagicDraw 17.0) with File->New Project-> Create SysML project. Click on the Options menu. Select “use Module”. Choose the SysML4Modelica profile. The SysML4Modelica profile is located in the edu.gatech.mbse.mdsysmlmodelica\org.gt.mbse.mdsysmlmodelica\MagicDraw Projects folder with the name sysml4modelicaprofile.mdzip. Click Next. In the field “Module Packages”, the SysML4Modelica package should be displayed. If yes, make sure that it is marked and click on “Finish”. This new empty SysML project with the SysML4Modelica profile as module should be saved. It can then be reused on future occasions as a MagicDraw project that is ready to directly import a Modelica model.