SimulationWorker Class |
Special behavior can be specified in the SimulationParameters.
Namespace: DHI.Mike1D.SimLauncher
The SimulationWorker type exposes the following members.
Name | Description | |
---|---|---|
SimulationWorker |
Constructor. If form is null, then the simulation run in silent mode (no GUI output)
|
Name | Description | |
---|---|---|
Controller |
Controller that the worker is currently working on.
| |
DiagnosticsHandler |
Diagnostics handler that are used for all diagnostics objects and events.
| |
HtmlErrorLog | ||
HtmlSummary | ||
Mike1DData |
MIKE 1D setup.
This will be populated during Load. It is also possible to provide the Mike1DData and call directly Run. | |
NumberOfRuns |
Number of consecutive runs to complete when the user chooses to re-run the calculation.
Only relevant for Pipe Design simulations.
Default value is 1.
| |
SetupFilePath | Path of setup file | |
SimulationParameters |
Simulation parameters
| |
WorkerThread |
Name | Description | |
---|---|---|
CreateSetupfilenameWithID |
Create a setup file name including the id provided.
| |
Dispose | Releases all resources used by the SimulationWorker | |
DrawTextProgressBar |
Draw a progress bar at the current cursor position.
Be careful not to Console.WriteLine or anything whilst using this to show progress!
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FlipPauseFlag |
Flip the Pause flag, i.e. if running, make it pause, if paused, make it run.
| |
GetDefaultLogFileName | ||
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Load |
Load the setup
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ModifySetupfilepathWithID |
Modify the setup file path to include the id.
| |
Run | ||
RunXmlCompare |
Run compare on original mike1d data object and
an object loaded from xml.
| |
StartWorkInBackground |
Calling this method will load and run the simulation (call Work) in a background thread
| |
StopSimulation |
Stop the simulation. The simulation will end
when the current time step has been completed.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Work | ||
WriteHtmlSummary |
Name | Description | |
---|---|---|
ControllerEvent |
Event that is raised while the controller is running.
It is raised whenever the state of the controller changes.
This is a shortcut for registering for the ControllerEvent. The sender of the event is the IMike1DController that triggered the event. Note that some simulation types use more than one controller, and the same set of events will be triggered several times. | |
ErrorEvent | Event triggered in case an error occured. This will also be triggered before an exception is thrown. | |
NewControllerEvent |
Event triggered when a new controller is created. This can be used to retrieve
and connect to the latest controller by using the Controller property
| |
SetupLoadedEvent | Event triggered when a setup has been loaded | |
SetupLoadingEvent | Event triggered when a setup starts loading | |
SimulationDoneEvent | Event triggered when the simulation is done | |
SimulationPauseEvent | Event triggered in case the simulation has been paused. |
Name | Description | |
---|---|---|
DateTimeFormatString |
Date time format used for log files and GUI.
|