Opened 11 years ago

Closed 8 years ago

#2533 closed defect (invalid)

plot error in OMShell

Reported by: esquire70 Owned by: somebody
Priority: high Milestone: 1.12.0
Component: Interactive Environment Version: trunk
Keywords: plot Cc:

Description

When using OMShell, I get the following error:

Error: Class plot not found in scope <global scope> (looking for a function or record).

This occurs after issuing the following commands:

loadFile("HelloWorld.mo")
simulate(HelloWorld, stopTime=4)
plot(x, xrange={0.0, 2.0})

However, plot(x) works fine. I could re-run the simulation with stopTime=2, but this takes a while for complicated models.

Here are the contents of HelloWorld.mo

class HelloWorld

Real x(start = 1);
parameter Real a = 1;

equation

der(x) = - a * x;

end HelloWorld;

The output of the simulate(HelloWorld, stopTime=4) is

record SimulationResult

resultFile = "/home/esquires3/shr/C5/modelica/book/temp/HelloWorld_res.mat",
simulationOptions = "startTime = 0.0, stopTime = 4.0, numberOfIntervals = 500, tolerance = 0.000001, method = 'dassl', fileNamePrefix = 'HelloWorld', options = , outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = , simflags = ",
messages = "",
timeFrontend = 0.013494170000000002,
timeBackend = 0.004706184,
timeSimCode = 0.002829409,
timeTemplates = 0.028408355000000003,
timeCompile = 0.607433238,
timeSimulation = 0.205029652,
timeTotal = 0.863685592

end SimulationResult;
Warning: The initial conditions are not fully specified. Use +d=initialization for more information.

Change History (9)

comment:1 by esquire70, 11 years ago

This issue occurred in r17628

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

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

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

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:4 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:5 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:6 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:7 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:8 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:9 by Henning Kiel, 8 years ago

Resolution: invalid
Status: newclosed

You should use capital 'R' in xRange, then it works as expected:
plot(x, xRange={0.0, 2.0})

Note: See TracTickets for help on using tickets.