Class COptQuestAngleVariable
In every solution that the engine generates, the angle is on the arc from minDeg to
maxDeg. When the difference between maxDeg and minDeg is 360 or more, the
arc is the full circle. Otherwise the arc goes from minDeg to maxDeg in the
direction of increasing angle, so an arc with minDeg greater than maxDeg, such as
320 to 40, crosses 0.
Variable names: <name>@theta, the angle in degrees.
The engine reports the angle as its equivalent from 0 up to, but not including, 360, not in
the range that you declare. For example, for an arc declared from -45 to 45, the engine reports
-45 as 315. To compare the value with the declared bounds, add or subtract 360 until the value is
at least minDeg and less than minDeg + 360. The value is then from minDeg
to maxDeg. When minDeg is greater than maxDeg, compare the value with
maxDeg + 360 instead of maxDeg. For example, on the arc from 320 to 40, a
reported 10 becomes 370, which is from 320 to 400.
In most programs, you add this variable with
OptQuestModel.AddAngleVariable
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
ConstructorsConstructorDescriptionCOptQuestAngleVariable(String name) Creates an angle variable on the full circle.COptQuestAngleVariable(String name, double minDeg, double maxDeg) Creates an angle variable on the arc fromminDegtomaxDeg. -
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list, because an angle variable has no ordinary input variables.Returns an empty list, because an angle 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
-
COptQuestAngleVariable
Creates an angle variable on the full circle.- Parameters:
name- base name of the variable- Throws:
COptQuestException- if an error occurs while the variable is created
-
COptQuestAngleVariable
Creates an angle variable on the arc fromminDegtomaxDeg.- Parameters:
name- base name of the variableminDeg- start of the arc, in degreesmaxDeg- end of the arc, in degrees- Throws:
COptQuestException- ifminDegormaxDegis NaN
-
-
Method Details
-
getInputVariables
Returns an empty list, because an angle variable has no ordinary input variables.The value of an angle variable is in the list that
getProjectedInputVariables()returns. That list has one variable,<name>@theta.- Returns:
- an empty list
-
getOutputVariables
Returns an empty list, because an angle variable has no output variables.The value of an angle variable is in the list that
getProjectedInputVariables()returns. That list has one variable,<name>@theta.- 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
-