IMike1DController Interface

The IMike1DController is the starting point for controlling and running a simulation. Depending on the underlying data components, the controller may do different things. Different data controllers may also do different things on the same data components. The following are examples of controllers:
  • HD controller: runs an HD simulation, including add ons (rainfall runoff, AD etc.)
  • RR controller: runs an RR simulation.
  • RR calibration controller: runs an RR calibration.
  • LTS controller: runs a LTS (Long Term Statistics) HD simulation.

Definition

Namespace: DHI.Mike1D.Mike1DDataAccess
Assembly: DHI.Mike1D.Mike1DDataAccess (in DHI.Mike1D.Mike1DDataAccess.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public interface IMike1DController

Properties

CurrentTime Current time of controller.
EngineNet The enginenet used for the simulation
Mike1DData The Mike1DData that defines the simulation setup
ProgressState Progress state of the controller, specifying how far the controller has progressed. One of Initialized,Prepared,Running.
ResultDataList List of all result data components associated with
RuntimeDiagnostics Diagnostics that are used during the simulation (prepare, run)
SimulationType String to indicate the type of simulation being run. Used for user output only.
State Current state of the controller
Timings Detailed timings of the different parts of the simulation.

Methods

Finish Finish and clean up.
Initialize Initialize the engine. Initialize sets up the engine net. When done, the EngineNet will be ready to inform on what data is available
Prepare Prepare the engine. This is called just before run is called. I will set the initial state (initial conditions), open output files etc.
RaiseSpecialEvent Trigger a custom special event
Run Run the engine
RunUntil Run the engine until endTime.

endTime should not exceed the simulation end time.

StopSimulation Calling this function will end the simulation after the current timestep has been completed
Validate Validate that the Controller/data access modules does not have any errors/warnings. Can be called before Initialize(IDiagnostics).

Events

ControllerEvent Event that is raised while the controller is running. It is raised whenever the State of the controller changes.
SpecialEvent Event that is raised for special events

Extension Methods

CanWriteHtmlSummary Check if controller is in a state to write HTML summary
(Defined by ControllerExtensions)

See Also