JModelica.org
User Guide

Version 2.1

2017-09-21


Acknowledgements

This document is produced with DocBook 5 using XMLMind XML Editor for authoring, Norman Walsh's XSL stylesheets and a GNOME xsltproc + Apache fop toolchain. Math contents is converted from LaTeX using the TeX/LaTeX to MathML Online Translator by the Ontario Research Centre for Computer Algebra and processed by JEuclid.

Table of Contents

1. Introduction
1.1. About JModelica.org
1.2. Mission Statement
1.3. Technology
2. Installation
2.1. Supported platforms
2.2. Installation on Windows
2.2.1. Dependencies
2.2.2. Installation
2.2.3. Verifying the installation
2.2.4. Compilation from sources
2.3. Installation on Linux systems
2.3.1. Prerequisites
2.3.2. Compiling
2.3.3. Testing JModelica.org
3. Getting started
3.1. The JModelica.org Python packages
3.2. Starting a Python session
3.2.1. Windows
3.2.2. Linux
3.3. Running an example
3.4. Redefining the JModelica.org environment
3.4.1. Example redefining IPOPT_HOME
3.5. The JModelica.org user forum
4. Working with Models in Python
4.1. Introduction to models
4.1.1. The different model objects in JModelica.org
4.2. Compilation
4.2.1. Simple FMU-ME compilation example
4.2.2. Simple FMU-CS compilation example
4.2.3. Compiling from libraries
4.2.4. Compiler settings
4.3. Loading models
4.3.1. Loading an FMU
4.3.2. Transferring an Optimization Problem
4.4. Changing model parameters
4.4.1. Setting and getting parameters
4.5. Debugging models
4.5.1. Compiler logging
4.5.2. Runtime logging
4.5.3. Compiler Diagnostic Output
5. Simulation of FMUs in Python
5.1. Introduction
5.2. A first example
5.3. Simulation of Models
5.3.1. Convenience method, load_fmu
5.3.2. Arguments
5.3.3. Return argument
5.4. Examples
5.4.1. Simulation of a high-index model
5.4.2. Simulation and parameter sweeps
5.4.3. Simulation of an Engine model with inputs
5.4.4. Simulation using the native FMI interface
5.4.5. Simulation of Co-Simulation FMUs
6. Dynamic Optimization in Python
6.1. Introduction
6.2. A first example
6.3. Solving optimization problems
6.4. Scaling
6.5. Dynamic optimization of DAEs using direct collocation with CasADi
6.5.1. Algorithm overview
6.5.2. Examples
6.5.3. Investigating optimization progress
6.5.4. Eliminating algebraic variables
6.6. Derivative-Free Model Calibration of FMUs
7. Graphical User Interface for Visualization of Results
7.1. Plot GUI
7.1.1. Introduction
7.1.2. Edit Options
7.1.3. View Options
7.1.4. Example
8. The Optimica Language Extension
8.1. A new specialized class: optimization
8.2. Attributes for the built in class Real
8.3. A Function for accessing instant values of a variable
8.4. Class attributes
8.5. Constraints
9. Limitations
A. Compiler options
A.1. List of options that can be set in compiler
B. Using External Functions in Modelica
B.1. Introduction
B.2. LibraryDirectory
B.3. GCC
C. Release Notes
C.1. Release notes for JModelica.org version 2.1
C.1.1. Highlights
C.2. Release notes for JModelica.org version 2.0
C.2.1. Highlights
C.2.2. Compiler
C.3. Release notes for JModelica.org version 1.17
C.3.1. Highlights
C.3.2. Compiler
C.4. Release notes for JModelica.org version 1.16
C.4.1. Highlights
C.4.2. Compiler
C.4.3. Optimization
C.5. Release notes for JModelica.org version 1.15
C.5.1. Highlights
C.5.2. Compiler
C.5.3. Simulation
C.6. Release notes for JModelica.org version 1.14
C.6.1. Highlights
C.6.2. Compiler
C.6.3. Simulation
C.6.4. Optimization
C.7. Release notes for JModelica.org version 1.13
C.7.1. Highlights
C.7.2. Compilers
C.7.3. Simulation
C.7.4. Optimization
C.8. Release notes for JModelica.org version 1.12
C.8.1. Highlights
C.8.2. Compilers
C.8.3. Simulation
C.8.4. Contributors
C.9. Release notes for JModelica.org version 1.11
C.9.1. Highlights
C.9.2. Compilers
C.9.3. Simulation
C.9.4. Contributors
C.10. Release notes for JModelica.org version 1.10
C.10.1. Highlights
C.10.2. Compilers
C.10.3. Python
C.10.4. Simulation
C.10.5. Optimization
C.10.6. Contributors
C.11. Release notes for JModelica.org version 1.9.1
C.12. Release notes for JModelica.org version 1.9
C.12.1. Highlights
C.12.2. Compilers
C.12.3. Python
C.12.4. Simulation
C.12.5. Optimization
C.12.6. Contributors
C.13. Release notes for JModelica.org version 1.8.1
C.14. Release notes for JModelica.org version 1.8
C.14.1. Highlights
C.14.2. Compilers
C.14.3. Python
C.14.4. Optimization
C.14.5. Contributors
C.15. Release notes for JModelica.org version 1.7
C.15.1. Highlights
C.15.2. Compilers
C.15.3. Python
C.15.4. Simulation
C.15.5. Optimization
C.15.6. Contributors
C.16. Release notes for JModelica.org version 1.6
C.16.1. Highlights
C.16.2. Compilers
C.16.3. Python
C.16.4. Optimization
C.16.5. Eclipse Modelica plugin
C.16.6. Contributors
C.17. Release notes for JModelica.org version 1.5
C.17.1. Highlights
C.17.2. Compilers
C.17.3. Simulation
C.17.4. Initialization of DAEs
C.17.5. Optimization
C.17.6. Contributors
C.18. Release notes for JModelica.org version 1.4
C.18.1. Highlights
C.18.2. Compilers
C.18.3. Python interface
C.18.4. Simulation
C.18.5. Contributors
C.19. Release notes for JModelica.org version 1.3
C.19.1. Highlights
C.19.2. Compilers
C.19.3. JModelica.org Model Interface (JMI)
C.19.4. Assimulo
C.19.5. FMI compliance
C.19.6. XML model export
C.19.7. Python integration
C.19.8. Contributors
C.20. Release notes for JModelica.org version 1.2
C.20.1. Highlights
C.20.2. Compilers
C.20.3. The JModelica.org Model Interface (JMI)
C.20.4. The collocation optimization algorithm
C.20.5. New simulation package: Assimulo
C.20.6. FMI compliance
C.20.7. XML model export
C.20.8. Python integration
C.20.9. Contributors
Bibliography