Opened 10 years ago

Closed 7 years ago

#3131 closed defect (fixed)

constraint is a protected keyword with Optimica language extension

Reported by: lafrasu@… Owned by: somebody
Priority: high Milestone: Future
Component: *unknown* Version: trunk
Keywords: Cc:

Description

I get the following error when trying to load the Modelica Standard Library while also using the +g=Optimica option:

"[/usr/lib/omlibrary/Modelica 3.2.1/Mechanics/MultiBody/Examples/Constraints.mo:18:24-18:33:writable] Error: No viable alternative near token: Prismatic
Error: Failed to load package Modelica.Blocks (default) using MODELICAPATH /usr/lib/omlibrary:/home/lafras/.openmodelica/libraries/.

Without the Optimica extension the library loads. I suspect it's because a variable called constraint is created, however "constraint" is a keyword in Optimica.

Change History (2)

comment:1 by Martin Sjölund, 10 years ago

So what is the problem?

setCommandLineOptions("+g=Modelica");
loadModel(Modelica);
setCommandLineOptions("+g=Optimica");

comment:2 by Francesco Casella, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.