Class COptQuestSphericalAngleVariable
In every solution that the engine generates, the elevation is from minThetaDeg to
maxThetaDeg, and the azimuth is on the arc from minPhiDeg to maxPhiDeg.
The azimuth arc has the same rules as the arc of an angle variable: a difference of 360 or
more is the full circle, and an arc with minPhiDeg greater than maxPhiDeg crosses
0.
Variable names:
<name>@theta: the elevation in degrees, from -90 (straight down) through 0 (the horizon) to 90 (straight up).<name>@phi: the azimuth in degrees, where 0 is north and 90 is east.
The engine reports the azimuth as its equivalent from 0 up to, but not including, 360, not in
the range that you declare. For example, for an azimuth declared from -60 to 60, the engine
reports -60 as 300. To compare the azimuth with the declared bounds, use the rule for an angle
variable, with minPhiDeg and maxPhiDeg. The engine reports the elevation as it
is, within the declared range.
In most programs, you add this variable with
OptQuestModel.AddSphericalAngleVariable
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
ConstructorsConstructorDescriptionCOptQuestSphericalAngleVariable(String name, double minThetaDeg, double maxThetaDeg, double minPhiDeg, double maxPhiDeg) Creates a spherical angle variable. -
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list, because a spherical angle variable has no ordinary input variables.Returns an empty list, because a spherical 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
-
COptQuestSphericalAngleVariable
public COptQuestSphericalAngleVariable(String name, double minThetaDeg, double maxThetaDeg, double minPhiDeg, double maxPhiDeg) throws COptQuestException Creates a spherical angle variable.- Parameters:
name- base name of the variableminThetaDeg- smallest elevation, in degrees; must be from -90 to 90maxThetaDeg- largest elevation, in degrees; must be fromminThetaDegto 90minPhiDeg- start of the azimuth arc, in degreesmaxPhiDeg- end of the azimuth arc, in degrees- Throws:
COptQuestException- if a bound is NaN, if an elevation bound is outside [-90, 90], or ifminThetaDegis greater thanmaxThetaDeg
-
-
Method Details
-
getInputVariables
Returns an empty list, because a spherical angle variable has no ordinary input variables.The values of a spherical angle variable are in the list that
getProjectedInputVariables()returns. That list has two variables,<name>@thetaand<name>@phi.- Returns:
- an empty list
-
getOutputVariables
Returns an empty list, because a spherical angle variable has no output variables.The values of a spherical angle variable are in the list that
getProjectedInputVariables()returns. That list has two variables,<name>@thetaand<name>@phi.- 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
-