Skip to content

Commit 7855be3

Browse files
committed
Add ConstantParameterValue
1 parent 029ea18 commit 7855be3

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/DynamicBoundsBase.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ export HasStateBounds, HasConstantStateBounds, HasVariableStateBounds,
2525
include("problem.jl")
2626

2727
export Nominal, Lower, Upper, Undefined, IntegratorName, Value, Gradient,
28-
Subgradient, Bound, Relaxation,IsNumeric, IsSolutionSet, TerminationStatus,
29-
ParameterValue, ParameterBound, SupportSet, TerminationStatusCode, relax!,
28+
ConstantParameterValue, Subgradient, Bound, Relaxation,IsNumeric,
29+
IsSolutionSet, TerminationStatus, ParameterValue, ParameterBound,
30+
SupportSet, TerminationStatusCode, relax!,
3031
integrate!, make, AbstractDERelaxIntegator, AbstractODERelaxIntegrator,
3132
AbstractBoundLoc, TimeIndex, COMPLETED, EMPTY, RELAXATION_NOT_CALLED,
32-
NUMERICAL_ERROR, INVALID_OPTION, OTHER_ERROR, LIMIT_EXCEEDED, ParameterNumber,
33-
StateNumber, SupportNumber, LocalSensitivityOn
33+
NUMERICAL_ERROR, INVALID_OPTION, OTHER_ERROR, LIMIT_EXCEEDED,
34+
ParameterNumber, StateNumber, SupportNumber, LocalSensitivityOn
3435

3536
include("integrator.jl")
3637

src/integrator.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,17 @@ struct ParameterValue <: AbstractIntegratorAttribute
315315
end
316316
ParameterValue() = ParameterValue(-1)
317317

318+
319+
"""
320+
$(TYPEDEF)
321+
322+
A integrator attribute used to access the constant parameter values.
323+
"""
324+
struct ConstantParameterValue <: AbstractIntegratorAttribute
325+
i::Int
326+
end
327+
ConstantParameterValue() = ConstantParameterValue(-1)
328+
318329
"""
319330
$(TYPEDEF)
320331

0 commit comments

Comments
 (0)