Class COptQuestUserControlledVectorVariable


public class COptQuestUserControlledVectorVariable extends COptQuestManifoldVariable
An output vector variable: n output variables. The elements are ordinary output variables.

Variable names: <name>@1 to <name>@n, one for each element.

Your evaluator writes a value to each element before it submits the solution.

In most programs, you add this variable with OptQuestModel.AddOutputVectorVariable and your evaluator sets its values with OptQuestSolution.SetValue(String, double) and the generated names. Construct this class only when you add the variable with COptQuestOptimization.AddVariable(COptQuestVariable).

See Also:
  • OptQuestModel.AddOutputVectorVariable(String, int)
  • Constructor Details

    • COptQuestUserControlledVectorVariable

      public COptQuestUserControlledVectorVariable(String name, int n) throws COptQuestException
      Creates an output vector variable.
      Parameters:
      name - base name of the variable
      n - number of elements; must be at least 1
      Throws:
      COptQuestException - if n is less than 1
  • Method Details

    • getInputVariables

      public List<COptQuestVariable> getInputVariables()
      Returns an empty list, because an output vector variable has no ordinary input variables.

      The values of an output vector variable are in the list that getOutputVariables() returns. Your evaluator writes them. That list has the variables <name>@1 to <name>@n, one for each element.

      Returns:
      an empty list
    • getProjectedInputVariables

      public List<COptQuestUserControlledVariable> getProjectedInputVariables()
      Returns an empty list, because the values of an output vector variable are outputs.

      The values of an output vector variable are in the list that getOutputVariables() returns. Your evaluator writes them. That list has the variables <name>@1 to <name>@n, one for each element.

      Returns:
      an empty list
    • getOutputVariables

      public List<COptQuestUserControlledVariable> getOutputVariables()
      Description copied from class: COptQuestManifoldVariable
      Returns the outputs of this manifold variable.

      For the output vector, output matrix and output N-dimensional variables, your evaluator writes these values before it submits the solution. For a policy sequence variable, the engine computes these values, and your evaluator must not write them. For all other manifold variables, the list is empty.

      Specified by:
      getOutputVariables in class COptQuestManifoldVariable
      Returns:
      fixed-size or immutable list of outputs; never null