Click or drag to resize

AbstractMike1DController Class

An abstract base controller class.

It handles everything related to the ControllerEvent an delegates the real work on to the derived classes in the DoXXX methods.

Inheritance Hierarchy

Namespace:  DHI.Mike1D.Mike1DDataAccess
Assembly:  DHI.Mike1D.Mike1DDataAccess (in DHI.Mike1D.Mike1DDataAccess.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public abstract class AbstractMike1DController : IMike1DController

The AbstractMike1DController type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCurrentTime
Current time of simulation
Public propertyDiagnosticsHandler
Handler, taking care of diagnostics messages.
Public propertyEngineNet
The enginenet used for the simulation
Public propertyIsFailed
Bool indicating that the controller is in a failed state
Public propertyMike1DData
The Mike1DData that defines the simulation setup
Public propertyMinSecondsBetweenProgressEvent
Minimum number of seconds between the ControllerProgressEvent is triggered.
Public propertyProgressState
Progress state of the controller, specifying how far the controller has progressed. One of Initialized,Prepared,Running.
Public propertyResultDataList
List of all result data components associated with
Public propertyRuntimeDiagnostics
Diagnostics that are used during the simulation (prepare, run)
Public propertySimulationType
String to indicate the type of simulation being run. Used for user output only.
Public propertyState
Current state of the controller
Public propertyTimings
Detailed timings of the different parts of the simulation.
Top
Methods
  NameDescription
Protected methodChangeControllerState
Change the state of the controller. Also triggers the ControllerEvent
Protected methodDoFinish
Do finish simulation. Abstract method that must be overridden
Protected methodDoInitialize
Do Initialize. Abstract method that must be overridden
Protected methodDoPrepare
Do Prepare. Abstract method that must be overridden
Protected methodDoRun
Do Run. Abstract method that must be overridden
Protected methodDoRunUntil
Do RunUntil. Virtual method that must be overridden
Protected methodDoStopSimulation
Do Stop simulation. Abstract method that must be overridden
Protected methodDoValidate
Do Validate. Abstract method that must be overridden
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFinish
Finish and clean up.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialize
Initialize the engine. Initialize sets up the engine net. When done, the EngineNet will be ready to inform on what data is available
Protected methodInitTimings
Initiate timings
Protected methodInvokeControllerProgressEvent
Call to invoke a progress event
Public methodIsInActiveState
Returns true if the controller is in an active state and currently executing.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPrepare
Prepare the engine. This is called just before run is called. I will set the initial state (initial conditions), open output files etc.
Protected methodRaiseControllerFailedEvent
Put controller in a failed state, and issue a failed event on ControllerEvent
Public methodRaiseSpecialEvent
Trigger a custom special event
Public methodRun
Run the engine
Public methodRunManual
Must be called when running the engine manually, timestep by timestep, i.e. when not using the Run or RunUntil(DateTime) methods.

This is required for correctly transferring the engine to the run state before taking the time step.

Public methodRunUntil
Run the engine until endTime.

endTime should not exceed the simulation end time.

Public methodStopSimulation
Calling this function will end the simulation after the current timestep has been completed
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValidate
Validate that the Controller/data access modules does not have any errors/warnings. Can be called before Initialize(IDiagnostics).
Top
Events
  NameDescription
Public eventControllerEvent
Event that is raised while the controller is running. It is raised whenever the State of the controller changes.
Public eventControllerProgressEvent
Controller progress event, triggered whenever the controller has progressed, though no more often than MinSecondsBetweenProgressEvent
Public eventSpecialEvent
Event that is raised for special events
Top
Fields
  NameDescription
Protected field_engineNet
EngineNet
Protected field_engineNetGlobal
Global (entire) EngineNet. Used when decomposing setup into several domains, where this contains the full EngineNet
Protected field_mike1DData
MIKE 1D data object
Protected field_resultDataList
Active result data objects
Protected field_runtimeDiagnostics
Diagnostics object used during runtime
Protected field_state
Current state of controller
Protected field_suppressUnknownExceptions
Flag indicating whether to suppress unknown exception.
Protected field_timings
Timings used in controller
Top
Extension Methods
  NameDescription
Public Extension MethodCanWriteHtmlSummary
Check if controller is in a state to write HTML summary
(Defined by ControllerExtensions.)
Top
See Also