File tree Expand file tree Collapse file tree 4 files changed +38
-2
lines changed
docs/src/reference/dynamic_functions Expand file tree Collapse file tree 4 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ supports_dynamic_variable
10
10
UnsupportedDynamicVariable
11
11
add_dynamic_variable
12
12
AddDynamicVariableNotAllowed
13
+ MOI.is_valid(::MOI.ModelLike, ::DynamicVariableIndex)
14
+ InvalidDynamicVariableIndex
13
15
```
Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ supports_phase
10
10
UnsupportedPhase
11
11
AddPhaseNotAllowed
12
12
add_phase
13
+ MOI.is_valid(::MOI.ModelLike, ::PhaseIndex)
14
+ InvalidPhaseIndex
13
15
```
Original file line number Diff line number Diff line change @@ -65,4 +65,20 @@ An [`AddDynamicVariableNotAllowed`](@ref) is thrown if a dynamic variable cannot
65
65
to `model` in its current state.
66
66
"""
67
67
add_dynamic_variable (:: MOI.ModelLike , :: PhaseIndex ) =
68
- throw (AddDynamicVariableNotAllowed (" " ))
68
+ throw (AddDynamicVariableNotAllowed (" " ))
69
+
70
+ """
71
+ MOI.is_valid(model::MOI.ModelLike, index::DynamicVariableIndex)::Bool
72
+
73
+ Return a `Bool` indicating whether `index` refers to a valid object in `model`.
74
+ """
75
+ MOI. is_valid (model:: MOI.ModelLike , index:: DynamicVariableIndex )
76
+
77
+ """
78
+ InvalidDynamicVariableIndex(index::DynamicVariableIndex)
79
+
80
+ An error indicating that the dynamic variable `index` is invalid.
81
+ """
82
+ struct InvalidDynamicVariableIndex <: Exception
83
+ index:: DynamicVariableIndex
84
+ end
Original file line number Diff line number Diff line change @@ -61,4 +61,20 @@ in its current state.
61
61
"""
62
62
add_phase (:: MOI.ModelLike ) = throw (AddPhaseNotAllowed (" " ))
63
63
64
- MOI. operation_name (:: AddPhaseNotAllowed ) = " Adding a phase"
64
+ MOI. operation_name (:: AddPhaseNotAllowed ) = " Adding a phase"
65
+
66
+ """
67
+ MOI.is_valid(model::MOI.ModelLike, index::PhaseIndex)::Bool
68
+
69
+ Return a `Bool` indicating whether `index` refers to a valid object in `model`.
70
+ """
71
+ MOI. is_valid (model:: MOI.ModelLike , index:: PhaseIndex )
72
+
73
+ """
74
+ InvalidPhaseIndex(index::PhaseIndex)
75
+
76
+ An error indicating that the phase `index` is invalid.
77
+ """
78
+ struct InvalidPhaseIndex <: Exception
79
+ index:: PhaseIndex
80
+ end
You can’t perform that action at this time.
0 commit comments