Class COptQuestTimeSeriesCorrectionVectorVariable
initial, plus
a correction. The engine arranges the values row by row as a longScale by
shortScale matrix, and the correction to that matrix has low rank. Use a
time-series correction vector variable to keep a known profile and change it with a few repeating
patterns.
In every solution that the engine generates, every value is from min to max,
and the matrix is initial plus a correction of rank at most rank. The engine
first moves each entry of initial into [min, max].
The value of rank is the number of patterns that the engine can combine in the
correction. With days as rows and hours as columns and rank 1, the correction to each day is one
pattern over the hours, multiplied by an amount that can differ from day to day. With each extra
unit of rank, the engine can combine one more pattern. With rank 0, the value is
initial with no correction.
Variable names: <name>@1 to <name>@n, where n is longScale
× shortScale. Names are in row order. With days as rows and hours as columns, the
first shortScale names are the hours of day 1, the next shortScale names are the
hours of day 2, and so on. Hour h of day d is <name>@k, where k is (d - 1) ×
shortScale + h, with d and h counted from 1.
In most programs, you add this variable with
OptQuestModel.AddTimeSeriesCorrectionVectorVariable
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
ConstructorsConstructorDescriptionCOptQuestTimeSeriesCorrectionVectorVariable(String name, double[] initial, int longScale, int shortScale, int rank, double min, double max) Creates a time-series correction vector variable. -
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list, because a time-series correction vector variable has no ordinary input variables.Returns an empty list, because a time-series correction 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
-
COptQuestTimeSeriesCorrectionVectorVariable
public COptQuestTimeSeriesCorrectionVectorVariable(String name, double[] initial, int longScale, int shortScale, int rank, double min, double max) throws COptQuestException Creates a time-series correction vector variable.- Parameters:
name- base name of the variableinitial- the baseline vector; it must havelongScale×shortScalevalueslongScale- number of rows of the matrix, for example the number of days; must be at least 1shortScale- number of columns of the matrix, for example the number of hours in a day; must be at least 1rank- largest rank of the correction. A value greater than the number of rows or columns is reduced to it. With a value of 0 or less, the value of the variable isinitialwith no correction.min- lower bound of every elementmax- upper bound of every element- Throws:
COptQuestException- ifminormaxis NaN, or ifminis greater thanmax
-
-
Method Details
-
getInputVariables
Returns an empty list, because a time-series correction vector variable has no ordinary input variables.The values of a time-series correction vector variable are in the list that
getProjectedInputVariables()returns. That list has the variables<name>@1to<name>@n, where n islongScale×shortScale.- Returns:
- an empty list
-
getOutputVariables
Returns an empty list, because a time-series correction vector variable has no output variables.The values of a time-series correction vector variable are in the list that
getProjectedInputVariables()returns. That list has the variables<name>@1to<name>@n, where n islongScale×shortScale.- 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
-