- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » plot() does not work in OMShell on OSX
plot() does not work in OMShell on OSX
plot() does not work in OMShell on OSX
I am getting models to simulate fine using OM 1.6 on OSX. A plt file is generated and the data plotted successfully with other tools. After the plot({...}) command the value "true" is returned but no plot window is opened and no plot displayed.
Appreciate your advice.
Regards,
Lewis
Re: plot() does not work in OMShell on OSX
I don't know how is on Mac, but the plotting is done by OMPlotWindow which is started by the simulation runtime.
Maybe OPENMODELICAHOME is wrong or so, probably Martin can tell you more.
You could use plot2/plotParametric2 instead, which is based on Java and should work fine.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: plot() does not work in OMShell on OSX
Code:
$ unset OPENMODELICAHOME && cat a.mo && cat a.mos && /opt/local/bin/omc a.mos
class A
Real x;
equation
der(x) = time;
end A;
loadFile("a.mo");
simulate(A);
plot(x);
true
record SimulationResult
resultFile = "A_res.plt",
simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'A', storeInTemp = false, noClean = false, options = '', outputFormat = 'plt'",
messages = "",
timeFrontend = 0.004679566,
timeBackend = 0.000658616,
timeSimCode = 0.001480352,
timeTemplates = 0.001502038,
timeCompile = 0.770774324,
timeSimulation = 0.017465982,
timeTotal = 0.796675502
end SimulationResult;
true
The following shows the evil little OMPlotWindow. What tool are you using? MDT?
- sjoelund.se
- 1700 Posts
Re: plot() does not work in OMShell on OSX
The evil little window remains elusive...
Wombat:~ lewis$ unset OPENMODELICAHOME
Wombat:~ lewis$ cd Models/junk/
Wombat:junk lewis$ /opt/local/bin/omc a.mos
true
record SimulationResult
resultFile = "A_res.plt",
simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'A', storeInTemp = false, noClean = false, options = '', outputFormat = 'plt'",
messages = "",
timeFrontend = 0.00562785,
timeBackend = 0.000820135,
timeSimCode = 0.001637659,
timeTemplates = 0.001910501,
timeCompile = 0.967065621,
timeSimulation = 0.032840318,
timeTotal = 1.010072317
end SimulationResult;
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Abort trap
I am using OMShell. The environment variables work for OMEdit and MDT (excepting for TMPDIR in MDT, subject of recent post)
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » plot() does not work in OMShell on OSX