Class COptQuestSphericalRegionVariable
In every solution that the engine generates, the point is inside the polygon or on its boundary. The edges of the polygon are great-circle arcs, not lines of constant latitude.
List the vertices clockwise, as on a map with north up: the region is on your right as you walk from each vertex to the next. This is the Esri rule for the outer ring of a polygon. The same vertices in counterclockwise order give the rest of the Earth. A region can enclose a pole, span more than 180 degrees of longitude, or be larger than a hemisphere. For a region around the North Pole, list the vertices from east to west. You do not need to repeat the first vertex at the end. The boundary must not cross itself.
Variable names:
<name>@theta: the latitude of the point, in degrees.<name>@phi: the longitude of the point, in degrees, from -180 to 180.
In most programs, you add this variable with
OptQuestModel.AddSphericalRegionVariable
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
ConstructorsConstructorDescriptionCOptQuestSphericalRegionVariable(String name, double[][] polygon) Creates a spherical region variable. -
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list, because a spherical region variable has no ordinary input variables.Returns an empty list, because a spherical region 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
-
COptQuestSphericalRegionVariable
Creates a spherical region variable.- Parameters:
name- base name of the variablepolygon- the vertices, one row {latitude, longitude} in degrees for each vertex, with the latitude first; there must be at least three- Throws:
COptQuestException- ifpolygonis null or has a vertex with fewer than two coordinates, a coordinate that is not finite or a latitude outside [-90, 90]; if it has fewer than three different vertices or two consecutive antipodal vertices; or if the boundary doubles back on itself or encloses no area
-
-
Method Details
-
getInputVariables
Returns an empty list, because a spherical region variable has no ordinary input variables.The values of a spherical region 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 region variable has no output variables.The values of a spherical region 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
-