How to perform optimization in Dymola or Openmodelica ?
after simulation of a model, how can we start dynamic optimizing in dymola or openmodelica ?
First time here? Check out the Help page!
after simulation of a model, how can we start dynamic optimizing in dymola or openmodelica ?
Dymola, OpenModelica and JModelica all have support for optimization, see
There are also various users who used GenOpt with Modelica models that were compiled using Dymola. An example is available in the GenOpt download under example/dymola
Using BuildingsPy (http://simulationresearch.lbl.gov/mod...) you could also run your Dymola model from Python and then use another Python package for the optimization such as from SciPy.org. There are also a few other Python packages such as PySimulator, that allow you to interface with Modelica models, and JModelica also provides its own Python bindings.
Lastly, if you use Wolfram Research's or Maplesoft's Modelica environment, then you can use the optimization packages from Mathematica or Maple, respectively.
thanks Sir I just chose Genopt and it worked fine now I'm dealing with the idea of : 1- Modeling and Simulation with Dymola 2- Optimizing with Genopt 3- make it work as a loop with PYTHON.
I already done the first two now and started python and loaded the simulation,now I don't know how can I bring Genopt in to Python .
GenOpt is a Java application, hence you can call it from Python for example using https://www.py4j.org/
If you have problems with py4j or JPype, you could also use
$> ipython
In [1]: import subprocess
In [2]: subprocess.call(["java", "-cp", "genopt.jar", "genopt.GenOpt", "optLinux.ini"])
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2016-01-08 18:26:51 -0600
Seen: 2,794 times
Last updated: Jan 08 '16