Opened 11 years ago
Last modified 9 years ago
#2588 closed defect
+modelicaOutput does not work properly. — at Version 1
Reported by: | Lennart Ochel | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
The configuration flag + modelicaOutput
does not work properly as the following script illustrates:
loadString(" package foo connector bInput = input Boolean \"'input Boolean' as connector\"; connector bOutput = output Boolean \"'output Boolean' as connector\"; model M1 bOutput signal(start=true, fixed=false); equation signal = time > 0.5; end M1; model M2 bInput signal; Real x(start=1, fixed=true); discrete Real t0(start=0, fixed=true); equation when edge(signal) then t0 = time; end when; der(x) = if signal then 1 else 0; end M2; model M1_M2 M1 control; M2 machine; equation connect(control.signal, machine.signal); end M1_M2; end foo; "); getErrorString(); setCommandLineOptions("+modelicaOutput"); getErrorString(); instantiateModel(foo.M1_M2); getErrorString();
The generated output is the following:
class foo.M1_M2 output Boolean control__signal(start = true, fixed = false); input Boolean machine__signal; Real machine__x(start = 1.0, fixed = true); discrete Real machine__t0(start = 0.0, fixed = true); equation control.signal = time > 0.5; when edge(machine.signal) then machine.t0 = time; end when; der(machine.x) = if machine.signal then 1.0 else 0.0; control__signal = machine__signal; end foo.M1_M2;
Note:
See TracTickets
for help on using tickets.