Mike1DControllerFactory Class

Factory class for creating IMike1DController.

The controller can either be created based on the content of Mike1DData, or from a IConnection, in which case the data will also be loaded.

The factory handles log files. By default a new log is created every time a new controller is created, and the log file is closed when the controller finishes. You can disable log files by setting DisableLogFile and if you want to reuse a log file for several controllers (append to it), set manually your own LogFileWriter.

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 class Mike1DControllerFactory
Inheritance
Object    Mike1DControllerFactory

Constructors

Mike1DControllerFactory Default constructor

Properties

DiagnosticsHandler User provided DiagnosticsHandler.

Set manually if a specified diagnostics handler is to be reused for several controllers, or if other types of control with the diagnositcs handler is required.

DisableLogFile Flag to disable log-file writing of the controller
KeepLogFileOpen Flag to keep log-file open after simulation has finalized
LogFileWriter User provided log file writer.

Set manually if a specified log file writer is to be reused for several controllers, or if other types of control with the log file writer is required.

If the log file writer is provided by the user, remember also to attach it to the DiagnosticsHandler diagnosticsHandler.MessageEvent += logFileWriter.AddLine;

Methods

Create(Mike1DData) Create controller based on content of the mike1DData.
Create(IConnection, IDiagnostics) Load data from file, and create controller.
Create(String, IDiagnostics) Load data from file, and create controller.
CreateController Create controller, using the provided MIKE 1D data object.

Sets up log-file writing.

CreatePreController Create pre-simulation controller. A pre-controller may need to run before the actual simulation in order to preproces any required data.

The only current pre-controller is auto-calibration of NAM/RDI catchments.

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OpenAndCreate Open setup and populate Mike1DData, and create a IMike1DController.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also