Click or drag to resize

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.

Inheritance Hierarchy
SystemObject
  DHI.Mike1D.Mike1DDataAccessMike1DControllerFactory

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

The Mike1DControllerFactory type exposes the following members.

Constructors
  NameDescription
Public methodMike1DControllerFactory
Default constructor
Top
Properties
  NameDescription
Public propertyDiagnosticsHandler
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.

Public propertyDisableLogFile
Flag to disable log-file writing of the controller
Public propertyKeepLogFileOpen
Flag to keep log-file open after simulation has finalized
Public propertyLogFileWriter
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;

Top
Methods
  NameDescription
Public methodStatic memberCreate(Mike1DData)
Create controller based on content of the mike1DData.
Public methodStatic memberCreate(String, IDiagnostics)
Load data from file, and create controller.
Public methodStatic memberCreate(IConnection, IDiagnostics)
Load data from file, and create controller.
Public methodCreateController
Create controller, using the provided MIKE 1D data object.

Sets up log-file writing.

Public methodCreatePreController
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.

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 methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpenAndCreate
Open setup and populate Mike1DData, and create a IMike1DController.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also