Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

Exercise outline

We want to run the FM model and set its time parameters.

Run a FM model (and set its time parameters)


Add the following import statement to the region Import libs:

Code Block
languagepython
# .NET lib
from System import TimeSpan

# DeltaShell libs
from DelftTools.Shell.Core.Workflow import ActivityRunner


And add this code to the end of the script :

Code Block
languagepython
#region Run model (this takes some time +- 0.5 min)

fmModel.TimeStep = TimeSpan.FromMinutes(1) # time step 1 min
fmModel.StopTime = fmModel.StartTime.AddHours(1) # calculate 1 hour

ActivityRunner.RunActivity(fmModel)

#endregion



Wiki Markup
{scrollbar}