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 | ||
---|---|---|
| ||
{color}:
{code:language=python}
# .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 | ||
---|---|---|
| ||
{code} \\ And add this code to the end of the script : {code:language=python} #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 {code} \\ \\ |
scrollbar |
---|