Class COptQuestIncrementalTimeSeriesCorrectionVectorVariable


public class COptQuestIncrementalTimeSeriesCorrectionVectorVariable extends COptQuestManifoldVariable
An incremental time-series correction vector variable. Its value is a baseline vector, 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 rank 1. Use this variable to build a correction one rank at a time. Run an optimization, pass its best value as initial of the next variable of this type, and repeat. Each variable has a correction of rank 1 and does not store the corrections of earlier variables.

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 1. The engine first moves each entry of initial into [min, max].

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.AddIncrementalTimeSeriesCorrectionVectorVariable 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:
  • OptQuestModel.AddIncrementalTimeSeriesCorrectionVectorVariable(String, double[], int, int, int, double, double)
  • Constructor Details

    • COptQuestIncrementalTimeSeriesCorrectionVectorVariable

      public COptQuestIncrementalTimeSeriesCorrectionVectorVariable(String name, double[] initial, int longScale, int shortScale, int rank, double min, double max) throws COptQuestException
      Creates an incremental time-series correction vector variable.
      Parameters:
      name - base name of the variable
      initial - the baseline vector; it must have longScale × shortScale values
      longScale - number of rows of the matrix, for example the number of days; must be at least 1
      shortScale - number of columns of the matrix, for example the number of hours in a day; must be at least 1
      rank - the number of this variable in the sequence. Pass 1 for the first variable in the sequence, 2 for the next, and so on. The value must be at least 1. The value has no effect on the values of this variable.
      min - lower bound of every element
      max - upper bound of every element
      Throws:
      COptQuestException - if min or max is NaN, if min is greater than max, or if rank is less than 1
  • Method Details

    • getInputVariables

      public List<COptQuestVariable> getInputVariables()
      Returns an empty list, because an incremental time-series correction vector variable has no ordinary input variables.

      The values of an incremental time-series correction vector variable are in the list that getProjectedInputVariables() returns. That list has the variables <name>@1 to <name>@n, where n is longScale × shortScale.

      Returns:
      an empty list
    • getOutputVariables

      public List<COptQuestUserControlledVariable> getOutputVariables()
      Returns an empty list, because an incremental time-series correction vector variable has no output variables.

      The values of an incremental time-series correction vector variable are in the list that getProjectedInputVariables() returns. That list has the variables <name>@1 to <name>@n, where n is longScale × shortScale.

      Returns:
      an empty list
    • getProjectedInputVariables

      public List<COptQuestUserControlledVariable> getProjectedInputVariables()
      Description copied from class: COptQuestManifoldVariable
      Returns 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 one mix@<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:
      getProjectedInputVariables in class COptQuestManifoldVariable
      Returns:
      fixed-size or immutable list of these variables; never null