The JModelica.org Software Development Kit (SDK) is a bundle of tools needed to build the JModelica.org sources on Windows. The SDK is mainly intended for those of you who want to do some developement work on the platform. Another reason to work with the SDK is if you want to be able to build new versions with the latest code changes. For a well documented, tested and stable version of JModelica.org, we refer to our binary distribution which is built (for Windows) with every release.
The JModelica.org SDK Windows installer sets up a complete pre-configured environment with convenient start menu shortcuts.
The Python prerequisites for installing the JModelica.org SDK are the same as listed in Section 2.2. For Java however it is required to have a 32-bit JDK installed, not only a 32-bit JRE as for the binary installation.
Install a JDK
Get a 32-bit JDK.
Run the installer and follow the instructions to install the JDK on your computer.
Make sure that the prerequisites listed in Section 4.1 are installed before starting the JModelica.org SDK installation.
All tools, libraries and Python packages included in the binary distribution, see Section 3.1.1, are also included in the SDK. The SDK also includes a few extra tools:
Download the JModelica.org SDK and save the executable file somewhere on your computer.
Run the file by double-clicking and selecting "Run" if prompted with a security warning. This will launch an installer which should be self-explanatory. Select "Yes" at the end when asked if the source code should be checked out from JModelica.org as this is needed in the next step.
Build the sources:
Start the msys shell from the JModelica.org start menu.
Configure the sources for build and installation (this will create the subdirectories build and install) with:
./configure.sh
Compile the sources with make from the build folder:
cd build make && make install
Test the installation by starting a Python shell from the JModelica.org start menu and running an example. Starting the Python session from this start menu will set all the environment variables required to run the JModelica.org Python interface.
# Import the vdp example from pyjmi.examples import vdp # Run the vdp example and plot results vdp.run_demo()
The solver bundled in JModelica.org is Ipopt-MUMPS. However, it is possible to use other Ipopt solvers. This requires a few changes in the setup and rebuilding JModelica. The procedure is:
Open the script file configure.sh, located in the SDK root folder, in a text editor.
Search for the line --with-ipopt and exchange the default Ipopt solver path with the path to the solver that you want to use. Save and close.
Do the whole installation procedure again, that is: run configure, make and make install.
Open the file setenv.bat, which is also found in the SDK root folder, in a text editor.
Look for the line which sets the IPOPT_HOME environment variable and exchange the default path with the path to your solver.