Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » palm86
  • » Profile

Posts

Posts

What decides which variables end up in die Model_info.json file? I am trying to retrieve only the state variables from this file, because I am writing a script that will allow me to reinitialize a model to the final values of a previous simulation. Unfortunately, it seems not all the state variables are actually included in this file. Some discrete variables are also missing.

Strangely, on a different laptop (exact same machine type, different Ubuntu version, but same OpenModelica version) the state variables are all there.

Can the pre-built model be run from the scripting evironment. Or better yet, can I use OMPython to build a model once and then run it many times with different parameters?

Thanks for the reply. Does that mean that OM does this type of scaling (as does JModelica [http://www.jmodelica.org/api-docs/usersguide/1.4.0/ch08s07.html]):

T = f(p)

is replaced by the equation

T_scaled*T_nom = f(p_scaled*T_nom)

Or is it only used to stabilize the integration process? Or is that the same thing?

Hi

Are nominal values used in OpenModelica to scale values automatically. Are there some flags that need to be enabled?

Best regards
Daniel

Thanks. I will try my best. It may take some time.

Any ideas? It looks like OM thinks the system is overdetermined.

With LOG_LS I get this (amongst others):

LOG_LS            | warning | Failed to solve linear system of equations (no. 3045) at time 1.466359, system is singular for U[2, 2].
LOG_LS            | info    | Matrix U
|                 | |       | |          0
LOG_LS            | info    | Output vector x
|                 | |       | | [ 0]                    0
LOG_LS            | warning | The default linear solver fails, the fallback solver with total pivoting is started at time 1.466359. That might raise performance issues, for more information use -lv LOG_LS.
LOG_LS            | info    | Start solving Linear System 3045 (size 1) at time 1.46636 with Total Pivot Solver
LOG_LS            | info    | ###  0.000000  time to set Matrix A and vector b.
LOG_LS            | warning | Matrix singular!
LOG_LS            | info    | rank =  0

Running fro the command line with omc and these notable options:

cflags="-O3",
tolerance=1e-6

Yes, it simulates and then breaks with this error message:

stdout            | warning | The default linear solver fails, the fallback solver with total pivoting is started at time 0.000000. That might raise performance issues, for more information use -lv LOG_LS.
DASKR--  AT T (=R1) AND STEPSIZE H (=R2) THE                                   
      In above,  R1 =   1.4663589072380E+00   R2 =   3.7410878546409E-16
DASKR--  NONLINEAR SOLVER FAILED TO CONVERGE                                   
DASKR--  REPEATEDLY OR WITH ABS(H)=HMIN                                         
stdout            | warning | The corrector could not converge.
stdout            | warning | can't continue. time = 1.466359
assert            | warning | The following assertion has been violated at time 1.466359

<Here some variables go out of their min max ranges>

stdout            | info    | model terminate | Integrator failed. | Simulation terminated at time 1.46636

The OpenModelica commit pasted above is actually incorrect, here is the correct one: 7dfbb017b3da1f05671a15989aff0799ffdf2632

Unfortunately, I cannot provide the model as is. It is an entire package and I'm not allowed to share the code anyway. But I would want to find a way to debug it, so that I can generate a minimal failing model that I can send to you. Could you guide me through some debugging techniques?

I have a model that has been running without issue on OM. But which broke after an upgrade. I've finally managed to trace the commit in which it broke. From what I can tell (using git bisect) these seem to be the offending commits (@lochel):

OpenModelica: c3dd385ae1d2e287aa3acce84a97917e427e32ad
OMCompiler: 56d186b60d7904ed253b34995e6ff4543a16e09d

The model simulates for about 1 s and then fails. Whereas it used to simulated without flaws.

I would greatly appreciate some pointers to help debug this problem so that I can file issues.

Best regards
Daniel

  • Index
  • » Users
  • » palm86
  • » Profile
You are here: