Class PriorityLevelTimeLimitDefinition
This class stores priority level specific time limts for solving multi-hierarchical optimization models.
Inheritance
Inherited Members
Namespace: OPTANO.Modeling.Optimization
Assembly: Optimization.dll
Syntax
public class PriorityLevelTimeLimitDefinition
Properties
DefaultTimeLimitPerPriorityLevel
Gets or sets the default time limit per priority level. Value is used as fallback, if no override was defined via SetTimeLimitForPriorityLevel(Int32, TimeSpan). System.TimeSpan.Zero means "unlimited".
Declaration
public TimeSpan DefaultTimeLimitPerPriorityLevel { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Methods
GetTimeLimitForPriorityLevel(Int32)
Gets the time limit to use for the given priorityLevel
Declaration
public TimeSpan GetTimeLimitForPriorityLevel(int priorityLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | priorityLevel | The priority level. |
Returns
Type | Description |
---|---|
System.TimeSpan | The specific time limit definition, or DefaultTimeLimitPerPriorityLevel if no override was defined. |
IsCustomValueDefined(Int32)
Checks if a custom time limit for prioLevel
is defined.
Does not check whether or not the value is the same as the DefaultTimeLimitPerPriorityLevel.
Declaration
public bool IsCustomValueDefined(int prioLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | prioLevel | The priority level to check for. |
Returns
Type | Description |
---|---|
System.Boolean |
ResetTimeLimitForPriorityLevel(Int32)
Reset the time limit for the given priorityLevel
to DefaultTimeLimitPerPriorityLevel.
Declaration
public bool ResetTimeLimitForPriorityLevel(int priorityLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | priorityLevel | The priority level |
Returns
Type | Description |
---|---|
System.Boolean | True, if a custom override for |
SetTimeLimitForPriorityLevel(Int32, TimeSpan)
Sets the time limit definition to the given value.
Declaration
public void SetTimeLimitForPriorityLevel(int priorityLevel, TimeSpan timeLimit)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | priorityLevel | The priority level. |
System.TimeSpan | timeLimit | The time limit. |