Class COptQuestBSplineVectorVariable
length values on a smooth
curve defined by numKnots knots. Use a B-spline vector variable when the decision
is a long profile that changes smoothly, such as a setpoint schedule.
The curve is a uniform cubic B-spline. It is smooth, and it does not pass through its knots: each value is a weighted average of the nearby knot values. The knots are at evenly spaced elements, with the first and last knots at the two ends.
In every solution that the engine generates, every element is from min to max.
Variable names: <name>@1 to <name>@length, one for each element.
In most programs, you add this variable with
OptQuestModel.AddBSplineVectorVariable
and read its values with OptQuestSolution.GetValue(String) and the generated names.
Construct this class only when you add the variable with
COptQuestOptimization.AddVariable(COptQuestVariable).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCOptQuestBSplineVectorVariable(String name, int length, int numKnots, double min, double max) Creates a B-spline vector variable. -
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list, because a B-spline vector variable has no ordinary input variables.Returns an empty list, because a B-spline vector variable has no output variables.Returns the decision values of this manifold variable that are not ordinary decision variables.Methods inherited from class com.opttek.optquest.COptQuestManifoldVariable
getConstraintsMethods inherited from class com.opttek.optquest.COptQuestUserControlledVariable
GetReplicationStatistic, GetReplicationStatisticValue, SetExclusiveRange, SetLowerBound, SetReplicationStatistic, SetUpperBoundMethods inherited from class com.opttek.optquest.COptQuestVariable
equals, GetDOELowerBound, GetDOEUpperBound, GetExclusiveLowerBoundAt, GetExclusiveUpperBoundAt, getID, GetLowerBound, GetName, GetNumberOfExclusiveRanges, GetStepSize, GetSuggestedValue, GetUpperBound, getVarRange, hashCode, isZeroOne, SetName
-
Constructor Details
-
COptQuestBSplineVectorVariable
public COptQuestBSplineVectorVariable(String name, int length, int numKnots, double min, double max) throws COptQuestException Creates a B-spline vector variable.- Parameters:
name- base name of the variablelength- number of elements; must be at least 1numKnots- number of knots; the curve is smoother with fewer knots. A value less than 2 is used as 2, and a value greater than the number of elements is used as that number.min- lower bound of every elementmax- upper bound of every element- Throws:
COptQuestException- if an error occurs while the variable is created
-
-
Method Details
-
getInputVariables
Returns an empty list, because a B-spline vector variable has no ordinary input variables.The values of a B-spline vector variable are in the list that
getProjectedInputVariables()returns. That list has the variables<name>@1to<name>@length, one for each element.- Returns:
- an empty list
-
getOutputVariables
Returns an empty list, because a B-spline vector variable has no output variables.The values of a B-spline vector variable are in the list that
getProjectedInputVariables()returns. That list has the variables<name>@1to<name>@length, one for each element.- Returns:
- an empty list
-
getProjectedInputVariables
Description copied from class:COptQuestManifoldVariableReturns the decision values of this manifold variable that are not ordinary decision variables.For example, an angle variable returns
angle@theta, and a mixture variable returns onemix@<component>name for each component. In every solution that the engine generates, and in every suggested solution, these values are inside the set of the variable. Your evaluator reads them as inputs:OptQuestSolution.GetInputNames()returns them.A constraint that uses one of these names is checked after the evaluation, like a constraint on an output. Your evaluator can receive values that break the constraint, and the solution is then infeasible.
- Specified by:
getProjectedInputVariablesin classCOptQuestManifoldVariable- Returns:
- fixed-size or immutable list of these variables; never
null
-