LotSizingDataModel.Core
2.0.1
Core domain model, shared abstractions and XML-serializable entities.
Loading...
Searching...
No Matches
ObjectiveCriterionExecutionSpecification.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Xml.Serialization;
3
using
LotSizingDataModel.Core.Common
;
4
5
namespace
LotSizingDataModel.Core.DecisionModel.Objectives
;
6
7
/// <summary>
8
/// Specifies one executable criterion in a multiobjective policy.
9
/// </summary>
10
/// <remarks>
11
/// The criterion kind is generic. Weight and priority are explicit source data
12
/// and are never inferred from list position or naming conventions.
13
/// </remarks>
14
[Serializable]
15
[XmlType(TypeName =
"objectiveCriterionExecutionSpecification"
)]
16
public
sealed
class
ObjectiveCriterionExecutionSpecification
:
17
ModelObject
18
{
19
private
OptimizationObjectiveKind
_kind =
20
OptimizationObjectiveKind
.Economic;
21
22
private
double
_weight = 1.0;
23
private
int
_priority;
24
private
double
_absoluteTolerance;
25
26
[XmlAttribute(
"kind"
)]
27
public
OptimizationObjectiveKind
Kind
28
{
29
get
=> _kind;
30
set
=> SetProperty(ref _kind, value);
31
}
32
33
[XmlAttribute(
"weight"
)]
34
public
double
Weight
35
{
36
get
=> _weight;
37
set
38
{
39
if
(!
double
.IsFinite(value) || value <= 0.0)
40
{
41
throw
new
ArgumentOutOfRangeException(
42
nameof(value),
43
value,
44
"An executable objective weight must be finite and strictly positive."
);
45
}
46
47
SetProperty(ref _weight, value);
48
}
49
}
50
51
[XmlAttribute(
"priority"
)]
52
public
int
Priority
53
{
54
get
=> _priority;
55
set
56
{
57
if
(value < 0)
58
{
59
throw
new
ArgumentOutOfRangeException(
60
nameof(value),
61
value,
62
"Objective priority cannot be negative."
);
63
}
64
65
SetProperty(ref _priority, value);
66
}
67
}
68
69
[XmlAttribute(
"absoluteTolerance"
)]
70
public
double
AbsoluteTolerance
71
{
72
get
=> _absoluteTolerance;
73
set
74
{
75
if
(!
double
.IsFinite(value) || value < 0.0)
76
{
77
throw
new
ArgumentOutOfRangeException(
78
nameof(value),
79
value,
80
"Lexicographic tolerance must be finite and non-negative."
);
81
}
82
83
SetProperty(ref _absoluteTolerance, value);
84
}
85
}
86
}
LotSizingDataModel.Core.Common.ModelObject
Base class for model objects that notify listeners when one of their properties changes.
Definition
ModelObject.cs:16
LotSizingDataModel.Core.DecisionModel.Objectives.ObjectiveCriterionExecutionSpecification
Specifies one executable criterion in a multiobjective policy.
Definition
ObjectiveCriterionExecutionSpecification.cs:18
LotSizingDataModel.Core.DecisionModel.Objectives.ObjectiveCriterionExecutionSpecification.Weight
double Weight
Definition
ObjectiveCriterionExecutionSpecification.cs:35
LotSizingDataModel.Core.DecisionModel.Objectives.ObjectiveCriterionExecutionSpecification.Kind
OptimizationObjectiveKind Kind
Definition
ObjectiveCriterionExecutionSpecification.cs:28
LotSizingDataModel.Core.DecisionModel.Objectives.ObjectiveCriterionExecutionSpecification.Priority
int Priority
Definition
ObjectiveCriterionExecutionSpecification.cs:53
LotSizingDataModel.Core.DecisionModel.Objectives.ObjectiveCriterionExecutionSpecification.AbsoluteTolerance
double AbsoluteTolerance
Definition
ObjectiveCriterionExecutionSpecification.cs:71
LotSizingDataModel.Core.Common
Definition
DoubleTimeSeries.cs:7
LotSizingDataModel.Core.DecisionModel.Objectives
Definition
ObjectiveAggregationMode.cs:1
LotSizingDataModel.Core.DecisionModel.Objectives.OptimizationObjectiveKind
OptimizationObjectiveKind
Business-level optimization criterion family.
Definition
OptimizationObjectiveKind.cs:7
LotSizingDataModel.Core
DecisionModel
Objectives
ObjectiveCriterionExecutionSpecification.cs
Generated by
1.17.0