Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
{scrollbar}

h2. 

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
{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
languagepython
{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}
\\
\\



Wiki Markup
{scrollbar}