Click or drag to resize

UtilLimitTimeStepToCheckPoint Method

Make sure timestep hits exactly checkPoint.

The lookAhead parameter defines how many time steps before checkPoint to modify in order to hit the checkPoint. If lookAhead is 1, only the last time step before checkPoint will be modified. If 2, then two time steps before checkPoint will be modified etc.

Assuming checkPoint is after currentTime (suggestedTimeStep is returned).

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
C#
public static TimeSpan LimitTimeStepToCheckPoint(
	DateTime currentTime,
	TimeSpan suggestedTimeStep,
	DateTime checkPoint,
	int lookAhead
)

Parameters

currentTime
Type: SystemDateTime
suggestedTimeStep
Type: SystemTimeSpan
checkPoint
Type: SystemDateTime
lookAhead
Type: SystemInt32

Return Value

Type: TimeSpan
Time step that is sure to hit exactly checkPoint in this or one of the following time steps
See Also