Questions tagged [jmodelica]

An extensible Modelica-based open source platform for optimization, simulation, and analysis of complex dynamic systems.

From the docs:

JModelica.org is an extensible Modelica-based open source platform for optimization, simulation and analysis of complex dynamic systems. The main objective of the project is to create an industrially viable open source platform for optimization of Modelica models, while offering a flexible platform serving as a virtual lab for algorithm development and research.

JModelica.org is distributed under the GPL v.3 license approved by the Open Source Initiative.

JModelica.org at a glance:

  • Model your systems using the object-oriented and equation-based language Modelica
  • Solve your complex simulation and optimization problems using state of the art numerical algorithms
  • Automate your work in the Python scripting environment
  • Visualize your results
111 questions
1
vote
1 answer

PyFMI FMU-module method get_variable_unit() on constants

PyFMI FMU-module method get_variable_unit() does not work on constants. It seems to me that the PyFMI method for FMU-mouldes get_variable_unit() and _variable_description also handles constants and parameters. I have made a package M that contains…
janpeter
  • 681
  • 8
  • 22
1
vote
2 answers

FMU-module and transfer from OpenModelica to Python with PyFMI

Load OpenModelica FMU-module (with MSL noise-module) in Python environment with PyFMI does not work. I have tried to run exported FMU-modules from OpenModelica in PyFMI-environment. Deterministic models works fine. However, when I include noise…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

Cannot install JModelica on Ububtu

I am following the installation procedure here. I get the following error find: ‘Assimulo’: No such file or directory /bin/bash: line 3: cd: /home/akshay/Downloads/JModelica/build /Assimulo_build/Assimulo: No such file or directory python: can't…
yaska
  • 225
  • 3
  • 7
1
vote
1 answer

c function is not correctly called in JModelica

I have one Modelica model : model test Real x; Real y (start=10); function try input Real x; output Real y; external "C" testC(x,y) annotation(Include="#include "); end try; function round input Real u; input…
Sen
  • 21
  • 1
1
vote
1 answer

FMU-module method get_variable_unit() and more

Since FMI version 2.0 we have methods: get_variable_unit() and get_variable_display_unit() that brings the information from the Modelica code for the FMU-module. What I can see there is no impact on what you obtain from get_variable_data() from the…
janpeter
  • 681
  • 8
  • 22
1
vote
1 answer

jmodelica optimization has runtime error

I am trying to follow different papers and tutorials to learn how to solve optimization problems of modelica modells. In http://www.syscop.de/files/2015ss/events/opcon-thermal-systems/optimization_tool_chain_in_jmodelica.org_toivo_henningsson.pdf I…
Deepblue
  • 13
  • 2
1
vote
1 answer

Directional derivatives in JModelica FMUs

How can I enable directional derivatives in JModelica FMUs? I couldn't find any information about that compiler flag. Thanks
Neotake
  • 79
  • 7
1
vote
1 answer

Unable to import pyjmi module when changing directory

I am using JModelica 2.1 on Windows, and up until recently I was always able to import pyjmi without any issue. For example, in the IPython console, I would often run the following without issue: cd C:\mydirectory from pyjmi import * However,…
ATLPoly
  • 141
  • 4
1
vote
2 answers

Adding additional libraries to MODELICAPATH in JModelica

In JModelica I want to create models using components from multiple existing libraries. This means that it would be very useful to add the multiple libraries to the MODELICAPATH so components can be referenced without changing their existing paths.…
alkey
  • 986
  • 4
  • 16
  • 33
1
vote
1 answer

Converting Modelica models from Dymola to JModelica - Addressing Errors in Log File

I am currently trying to compile the netCDF-DataReader in JModelica but it appears the package has been developed in Dymola. The process fails at the compilation stage: netCD = compile_fmu('NcDataReader2.Examples.Simple',r'H:\Modelica\Modelica…
alkey
  • 986
  • 4
  • 16
  • 33
1
vote
2 answers

Use JModelica in Spyder/Python

I am using JModelica for simulation of Modelica models. The JModelica.org Python interface enables users to use Python scripting to interact with Modelica models; but JModelica.org is not only a Python package/library - Python packages are a part of…
Matias
  • 581
  • 1
  • 5
  • 16
1
vote
1 answer

Removing annotations from a Modelica model

I'm developing a Modelica library and need to produce a document with source code listings. I'd like to be able to include the source of the Modelica models without annotations. I could manually edit them out, but I'm looking for a more automated…
Raúl
  • 13
  • 5
1
vote
2 answers

Referencing External Files in JModelica

I have a Modelica file that references c code during simulation through an external library *.a file. For example: model CallAdd input Real FirstInput(start=0); input Real SecondInput(start=0); output Real FMUOutput(start=0); …
Justin Shultz
  • 199
  • 1
  • 11
1
vote
1 answer

FMU Variable Values Do Not Match Input

I'm getting some strange behavior in a simple co-simulation that I'm trying to configure. I setup a building energy model in EnergyPlus to test out an FMU generated from JModelica. However, the building energy model would get hung up at the…
Justin Shultz
  • 199
  • 1
  • 11
1
vote
1 answer

How to pass heatPorts.T to DynamicPipe flowModel?

In the implementation of a flow models that function with Modelica Standard Library DynamicPipe (or a similar model that builds from PartialTwoPortFlow) there are examples of flow models that take place in an environment with heat transfer that…
Scott G
  • 2,194
  • 1
  • 14
  • 24