kdavies4 / ModelicaRes

Set up, analyze, and plot Modelica simulations in Python
http://kdavies4.github.io/ModelicaRes/
Other
51 stars 20 forks source link

Set and read simulation start and stop times from a Dymola dsin.txt #25

Closed arnoutaertgeerts closed 9 years ago

arnoutaertgeerts commented 9 years ago

The simulator.run() method should be able to set start and stop times for the simulation. This can be done by changing their respective values in the corresponding dsin.txt if we extend the write_params() method. For example:

import modelicares.exps.write_params as write_params
write_params({
  'StartTime': 0,
  'StopTime': 1000
}

I'm no expert in these file manipulations so could you @kdavies4 have a look at how to efficiently implement this?

arnoutaertgeerts commented 9 years ago

This seams to be working already :) Closing this!

arnoutaertgeerts commented 9 years ago

I'm able to write the start and stop times but unable to read them, is this possible?

kdavies4 commented 9 years ago

Sure, that's a possible problem. I'm taking a look.

kdavies4 commented 9 years ago

Good catch. I fixed this in d15acbf.