Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
scrollbar |
---|
Now we can run the model by adding the runmodel statement :
Code Block | ||||
---|---|---|---|---|
| ||||
RunModel(flowModel, showDialog = True) |
This will run the whole model from start to end time time.
There is also an alternative way to run a your model, like this :
Code Block | ||
---|---|---|
| ||
numberOfTimeSteps = int((flowModel.StopTime - flowModel.StartTime).TotalSeconds / flowModel.TimeStep.TotalSeconds) flowModel.Initialize() for i in range(numberOfTimeSteps): flowModel.Execute() flowModel.Finish() flowModel.Cleanup() |
Here you can control the run by calling the model run functions yourself , and maybe add your own logic for every timestep.
scrollbar |
---|