Installation of JModelica in Linux

343 views
Skip to first unread message

Ken Joo Yeap

unread,
Aug 13, 2018, 8:47:56 AM8/13/18
to MPCPy

Hi,

I am a master Sudent and am doing a reasearch on MPCPy for my project. I faced some problems while trying to install Jmodelica in to the Virtuel Machine with Linux. I have installed all required packages according to the JModelica user Guide and faced problem while trying to complie Ipopt. The following command

svn co https://svn.jmodelica.org/trunk JModelica.org

gave me an svn: E205011 which I can't find the solution too. I tried to ignore and continue with the installation and after make install the error came out that I could not find the file Assimulo and the goal "install-recursive" failed.

Does anybody know an easier way to install JModelica? I foudn some in Git-Hub but wasn't sure if there's any recommended one, I also found some in Dockers.

Is JModelica a must to use MPCPy? Could I also use Dymola for example? If I do what are the attentions that I should make? As I am not very familiar with the file types (FMU? FMI? .MO?).

Another question I have is if there's already a date when the Windows competible MPCPy will be published?

I do not have much exprience posting questions online, therefore your advice for me should I amend of add more information would be very much appreciated!

Thanks!

Grettings,
Ken
Message has been deleted

Tom Stesco

unread,
Aug 13, 2018, 11:08:52 AM8/13/18
to MPCPy
Hi Ken, if you can use Docker I would highly recommend it. Just make sure you mount the right directories as volumes to your docker container and you can edit files that are running within the container with your editor of choice. Otherwise you need to use ssh or docker commands which is a bit trickier.

I'll see about posting a generic version of the Dockerfiles and Makefile I have for setting up my development environment.

As for JModelica, it's currently the supported pipeline for optimization with MPCPy. You could add different models and optimization methods to the framework, but JModelica is pretty powerful. Dymola is an option, but you may need to change the API - I've never used it.

The .FMU files are compiled from .MO (Modelica) files by JModelica in a way that is compliant with the FMI (the standard). You only need to edit or use Modelica files to build your model. 

Best,
Tom

dhb...@gmail.com

unread,
Aug 14, 2018, 2:24:09 AM8/14/18
to MPCPy
Hey Ken, 

Thanks for the post.

I'm not sure why you'd be getting that error trying to checkout the trunk of JModelica.  You may try checking out a specific version by using something like the following and seeing if that works (Note: I have not tested MPCPy with JModelica 2.2 yet):


Alternatively, Tom is right in that you could try a Docker container, such as michaelwetter/ubuntu-1604_jmodelica_trunk if you are using Ubuntu 1604.

You may use Dymola to edit .mo files and compile .fmu files to be used within MPCPy, however, there is no requirement or capability to use Dymola within MPCPy at the moment.  If you are new to the modelica and fmi ecosystem, I recommend you start with going through the online book: http://book.xogeny.com/, and you can get more information on fmi at https://fmi-standard.org/.  Just note that optimization places stricter rules on the modelica equations that can be optimized.  See for instance this post: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/mpcpy/bebFFgIS3QQ.

Hopefully this is helpful to you.

Best Regards, 

Dave

Ken Joo Yeap

unread,
Aug 14, 2018, 8:42:45 AM8/14/18
to MPCPy
Hi Dave,

thanks for the book suggestion! Seems like a good start!

I tried the alternative with JModelica 2.1 you sent me, unfortunately I get the same failure. I will now try to use the suggested docker and hope it will work.

Thanks for your help again, it's really helpful!

Best Regards,
Ken

Ken Joo Yeap

unread,
Aug 14, 2018, 8:45:26 AM8/14/18
to MPCPy
Hey Tom,

Thanks for your reply and the information, it helps me understand more how .FMU files are related to .MO! I will try to install the docker Dave mentioned before trying to use Dymola to run MPCPy.

Best,
Ken

Ken Joo Yeap

unread,
Aug 15, 2018, 3:50:32 AM8/15/18
to MPCPy
Hi Dave,

Do you know if there's a userguide for michaelwetter/ubuntu-1604_jmodelica_trunk? There isn't much documentation in the docker site. Do you know which JModelica version does the container has? I could only find JModelica UserGuide for 2.2 and 1.3.0 online. Could I do the mounting that Tom suggested to the michaelwetter/ubuntu-1604_jmodelica_trunk?

Thank you for your help with the information!

Best Regards,
Ken

On Tuesday, August 14, 2018 at 8:24:09 AM UTC+2, dhb...@gmail.com wrote:

Tom Stesco

unread,
Aug 15, 2018, 12:57:15 PM8/15/18
to MPCPy
Ya I also had a tough time finding good documentation on setting everything up, so I'm open sourcing this repo for setting up a JModelica container with Ipopt for MPCPy use: https://github.com/TStesco/docker-jmodelica-env

I put a setup guide in the readme, perhaps this can help you get started. This is set up to use the trunk (most up to date development version), but can be configured to use any tagged release version. You can also hot-swap development libraries, such as MPCPy, EstimationPy, and Modelica libraries (e.g. IBPSA), via mounting them to the containers. If you have any questions on it you can send me an email.

bruno.h...@gmail.com

unread,
Sep 26, 2018, 6:18:58 AM9/26/18
to MPCPy
Hi Ken,

I don't know if you could solve the problem using Docker, but in case you haven't: I have had the exact same problem when trying to compile JModelica for my Ubuntu 18.04 machine following the instructions in JModelica 2.2 User Guide. Looking for some documentation, I ran across this page, which says that there is currently a problem with some svn clients that are not able to resolve some external dependencies.

The workaround works as follows:

after running "svn co https://svn.jmodelica.org/trunk JModelica.org", run in addition

svn co https://svn.jmodelica.org/assimulo/trunk JModelica.org/external/Assimulo

then configure and make install as usual (described in the User Guide). That did it for me. Let us know if it worked!

Best,
Bruno
Reply all
Reply to author
Forward
0 new messages