Package localsolver
Class LSSurrogateParameters
- java.lang.Object
-
- localsolver.LSSurrogateParameters
-
public class LSSurrogateParameters extends java.lang.Object
Parameters specific to the surrogate modeling feature. Surrogate parameters can be used to query and set the evaluation budget and the evaluation points of the associated external function.- Since:
- 9.5
- See Also:
LSExternalContext.enableSurrogateModeling()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LSEvaluationPoint
createEvaluationPoint()
Creates an evaluation point for the external function.boolean
equals(java.lang.Object obj)
int
getEvaluationLimit()
Returns the maximum number of evaluations.LSEvaluationPoint
getEvaluationPoint(int pos)
Returns the evaluation point at the given position.int
getNbEvaluationPoints()
Returns the number of evaluation points.int
hashCode()
void
setEvaluationLimit(int evaluationLimit)
Sets the maximum number of evaluations.
-
-
-
Method Detail
-
getEvaluationLimit
public int getEvaluationLimit()
Returns the maximum number of evaluations. The default number of evaluations is set to the largest positive integer on 32 bits, that is 2^32-1 = 2,147,483,647 > 10^9.- Returns:
- The maximum number of calls to the external function.
-
setEvaluationLimit
public void setEvaluationLimit(int evaluationLimit)
Sets the maximum number of evaluations. The default number of evaluations is set to the largest positive integer on 32 bits, that is 2^32-1 = 2,147,483,647 > 10^9. Only allowed in statesLSState.Modeling
orLSState.Stopped
.- Parameters:
evaluationLimit
- The maximum number of calls to the external function.
-
createEvaluationPoint
public LSEvaluationPoint createEvaluationPoint()
Creates an evaluation point for the external function. It consists of a list of values corresponding to the function's arguments and return value. Evaluation points are used to specify known points for a function in advance. It can be useful to warm-start the solver when the function is particularly expensive to evaluate, or if you already have a good estimate of the optimal point. Only allowed in statesLSState.Modeling
orLSState.Stopped
.- Returns:
- Evaluation point.
- See Also:
LSEvaluationPoint
-
getNbEvaluationPoints
public int getNbEvaluationPoints()
Returns the number of evaluation points.- Returns:
- The number of evaluation points.
-
getEvaluationPoint
public LSEvaluationPoint getEvaluationPoint(int pos)
Returns the evaluation point at the given position.- Parameters:
pos
- Position of the evaluation point.- Returns:
- Evaluation point at the given position.
- See Also:
LSEvaluationPoint
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-