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
  • » tka
  • » Profile

Posts

Posts

Okay, I added +std=3.3 to Options -> Simulation -> OMC Flags. Now I get a different error message:

[5] 11:40:17 Translation Error
[PIDiscreteControllerClocked: 6:3-8:11]: Failed to instantiate equation
when Clock() then
  x = previous(x) + error * Ts / T;
end when;.

[6] 11:40:17 Translation Error
Error occurred while flattening model TankHybridPIClocked

The same happens with +std=latest. So, the model is not supported in OpenModelica? Has someone else tried it?

I am new to the Modelica language in general and OpenModelica in particular, and I try to simulate the hybrid tank model from the book "Principles of Object Oriented Modeling and Simulation with Modelica 3.3" (section 13.4.1). Everything works as expected for the first models (TankPI and TankHybridPI). However, when I try to flatten the next model, TankHybridPIClocked, I get an error:

[26] 15:21:46 Translation Error
[PIDiscreteControllerClocked: 6:3-8:11]: Looking for a function Clock but found a Clock.

[27] 15:21:46 Translation Error
Error occurred while flattening model TankHybridPIClocked

Any help with that problem would really be appreciated.

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