Opened 12 years ago
Closed 12 years ago
#2067 closed defect (fixed)
OMNotebook is not able to plot $cpu_time
Reported by: | Lennart Ochel | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Interactive Environment | Version: | trunk |
Keywords: | Cc: |
Description
If I simulate with simflags=”-cpu”, it is not possible to plot $cpu_time from OMNotebook.
Attachments (1)
Change History (12)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
I guess we can fix this in two ways:
- rename $cpu_time to a modelica-valid variable name. But then we can get into trouble if that specific variable-name is used in any model.
- maintain $cpu_time and fix the lexer instead
comment:5 by , 12 years ago
It is still not working! Maybe that is related to my corrupt OMNotebook installation. Can someone check that out?
loadString(" model test Real x; equation x = sin(x) + time; end test; "); simulate(test, simflags="-cpu"); plot('$cpu_time')
comment:6 by , 12 years ago
Option 3 was probably not a good idea - because that is the same as option 1. '$cpu_time' is already a valid modelica identifier, so we will get into trouble if someone will call a variable '$cpu_time'.
comment:7 by , 12 years ago
Ok. I'll see if I can add $cpuTime to the lexer. I don't like $cpu_time :)
comment:9 by , 12 years ago
Added $cpuTime to the identifiers known by OpenModelica in r15144.
The example works now and $cpuTime is plotted fine.
by , 12 years ago
Attachment: | $cpuTime.png added |
---|
comment:11 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I try to do something like this in OMNotebook:
But I get only that error-message:
In OMPlot and OMEdit everything is working quite fine.