public class LSParam
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getAdvancedParam(java.lang.String key)
Reserved for maintenance purpose.
|
double |
getAdvancedParam(java.lang.String key,
double defaultValue)
Reserved for maintenance purpose.
|
int |
getAdvancedParam(java.lang.String key,
int defaultValue)
Reserved for maintenance purpose.
|
java.lang.String |
getAdvancedParam(java.lang.String key,
java.lang.String defaultValue)
Reserved for maintenance purpose.
|
int |
getAnnealingLevel()
Deprecated.
As of 8.0, this parameter doesn't have a significant influence on the search anymore.
The tuning of this parameter won't be allowed in a future version.
|
double |
getDoubleObjectiveThreshold(int objectiveIndex)
Gets the threshold of the objective with the given index.
|
long |
getIntObjectiveThreshold(int objectiveIndex)
Gets the threshold of the objective with the given index.
|
long |
getIterationBetweenTicks()
Gets the number of iterations between two events of type
LSCallbackType.IterationTicked. |
long |
getIterationLimit()
Gets the maximum number of iterations.
|
LocalSolver |
getLocalSolver()
Returns the LocalSolver object associated to these parameters.
|
java.lang.String |
getLogFile()
Returns the path of the LocalSolver log file.
|
int |
getNbThreads()
Gets the number of threads requested by the user.
|
long |
getObjectiveThreshold(int objectiveIndex)
Gets the threshold of the objective with the given index.
|
int |
getSeed()
Gets the seed of the pseudo-random number generator used by the solver.
|
int |
getTimeBetweenDisplays()
Gets the time in seconds between two consecutive displays in console
while the solver is running.
|
int |
getTimeBetweenTicks()
Gets the time in seconds between two events of type
LSCallbackType.TimeTicked. |
int |
getTimeLimit()
Gets the time limit in seconds.
|
int |
getVerbosity()
Gets the verbosity level of the solver.
|
int |
hashCode() |
void |
setAdvancedParam(java.lang.String key,
double value)
Reserved for maintenance purpose.
|
void |
setAdvancedParam(java.lang.String key,
int value)
Reserved for maintenance purpose.
|
void |
setAdvancedParam(java.lang.String key,
java.lang.String value)
Reserved for maintenance purpose.
|
void |
setAnnealingLevel(int annealingLevel)
Deprecated.
As of 8.0, this parameter doesn't have a significant influence on the search anymore.
The tuning of this parameter won't be allowed in a future version.
|
void |
setDoubleObjectiveThreshold(int objectiveIndex,
double threshold)
Sets the threshold of the objective with the given index.
|
void |
setIntObjectiveThreshold(int objectiveIndex,
long threshold)
Sets the threshold of the objective with the given index.
|
void |
setIterationBetweenTicks(long iterationBetweenTicks)
Sets the number of iterations between two events of type
LSCallbackType.IterationTicked. |
void |
setIterationLimit(long iterationLimit)
Sets the maximum number of iterations.
|
void |
setLogFile(java.lang.String path)
Sets the path of the LocalSolver log file.
|
void |
setNbThreads(int nbThreads)
Sets the number of threads used to parallelize the search.
|
void |
setObjectiveThreshold(int objectiveIndex,
double threshold)
Sets the threshold of the objective with the given index.
|
void |
setObjectiveThreshold(int objectiveIndex,
long threshold)
Sets the threshold of the objective with the given index.
|
void |
setSeed(int seed)
Sets the seed of the pseudo-random number generator used by the solver.
|
void |
setTimeBetweenDisplays(int timeBetweenDisplays)
Sets the time in seconds between two consecutive displays in console
while the solver is running.
|
void |
setTimeBetweenTicks(int timeBetweenTicks)
Sets the time in seconds between two events of type
LSCallbackType.TimeTicked. |
void |
setTimeLimit(int timeLimit)
Sets the time limit in seconds.
|
void |
setVerbosity(int verbosity)
Sets the verbosity level of the solver.
|
java.lang.String |
toString()
Returns a String representation of these parameters.
|
public LocalSolver getLocalSolver()
public void setSeed(int seed)
LSState.Stopped. The search for solutions is
highly randomized. Fixing the seed and the number of iterations of the
solver allows you to reproduce exactly its results over several runs.seed - Seed of the pseudo-random number generator.public int getSeed()
LSState.Paused or LSState.Stopped.setSeed(int)public void setNbThreads(int nbThreads)
LSState.Stopped.
This parameter is indicative, if needed LocalSolver may use more threads.
The actual number of threads can also vary during the search.nbThreads - Number of threads.public int getNbThreads()
LSState.Paused
or LSState.Stopped.setNbThreads(int)public void setTimeLimit(int timeLimit)
LSState.Stopped.
This is not allowed if you have defined multiple phases. Use LSPhase.setTimeLimit(int)
to set the limit for each phase instead.timeLimit - Time limit in seconds.LSPhasepublic int getTimeLimit()
LSState.Paused or LSState.Stopped.
This is not allowed if you have defined multiple phases. Use LSPhase.getTimeLimit() instead.setTimeLimit(int),
LSPhasepublic void setIterationLimit(long iterationLimit)
LSState.Stopped.
This is not allowed if you have defined multiple phases. Use LSPhase.setIterationLimit(long)
to set the limit for each phase instead instead.iterationLimit - Iteration limit.LSPhasepublic long getIterationLimit()
LSState.Paused
or LSState.Stopped.
This is not allowed if you have defined multiple phases. Use LSPhase.getIterationLimit() instead.setIterationLimit(long),
LSPhase@Deprecated public void setAnnealingLevel(int annealingLevel)
LSState.Stopped.annealingLevel - Simulated annealing level.@Deprecated public int getAnnealingLevel()
LSState.Paused or LSState.Stopped.setAnnealingLevel(int)public void setVerbosity(int verbosity)
verbosity - Verbosity level: 0, 1, 2.public int getVerbosity()
setVerbosity(int)public void setObjectiveThreshold(int objectiveIndex,
long threshold)
LSState.Stopped. This method has the same behavior as
setIntObjectiveThreshold(int, long).objectiveIndex - Index of the objective.threshold - Objective threshold.LSExpression.isObjective(),
LSExpression.isInt()public void setObjectiveThreshold(int objectiveIndex,
double threshold)
LSState.Stopped. This method has the same behavior as
setDoubleObjectiveThreshold(int, double).objectiveIndex - Index of the objective.threshold - Objective threshold.LSExpression.isObjective(),
LSExpression.isDouble()public void setIntObjectiveThreshold(int objectiveIndex,
long threshold)
LSState.Stopped.objectiveIndex - Index of the objective.threshold - Objective threshold.LSExpression.isObjective(),
LSExpression.isInt()public void setDoubleObjectiveThreshold(int objectiveIndex,
double threshold)
LSState.Stopped.objectiveIndex - Index of the objective.threshold - Objective threshold.LSExpression.isObjective(),
LSExpression.isDouble()public long getObjectiveThreshold(int objectiveIndex)
LSState.Paused or LSState.Stopped.objectiveIndex - Index of the objective.setObjectiveThreshold(int, long)public long getIntObjectiveThreshold(int objectiveIndex)
LSState.Paused or LSState.Stopped.objectiveIndex - Index of the objective.setObjectiveThreshold(int, long)public double getDoubleObjectiveThreshold(int objectiveIndex)
LSState.Paused or LSState.Stopped.objectiveIndex - Index of the objective.setObjectiveThreshold(int, double)public void setTimeBetweenDisplays(int timeBetweenDisplays)
LSState.Stopped.timeBetweenDisplays - Time in seconds between displays.public int getTimeBetweenDisplays()
LSState.Paused or LSState.Stopped.setTimeBetweenDisplays(int)public void setTimeBetweenTicks(int timeBetweenTicks)
LSCallbackType.TimeTicked.
The default time between ticks is set to 1 second. Only allowed in
state LSState.Stopped.timeBetweenTicks - Time in seconds between ticks.public int getTimeBetweenTicks()
LSCallbackType.TimeTicked.
Only allowed in states LSState.Paused or LSState.Stopped.setTimeBetweenTicks(int)public void setIterationBetweenTicks(long iterationBetweenTicks)
LSCallbackType.IterationTicked.
The default number of iterations between ticks is set to 10,000.
Only allowed in state LSState.Stopped.iterationBetweenTicks - Number of iterations between ticks.public long getIterationBetweenTicks()
LSCallbackType.IterationTicked.
Only allowed in states LSState.Paused or LSState.Stopped.setIterationBetweenTicks(long)public void setLogFile(java.lang.String path)
setVerbosity(int).
Only allowed in states LSState.Stopped or
LSState.Modeling.path - Path of the log file. Leave empty to disable the logging
mechanism.setVerbosity(int),
getLogFile()public java.lang.String getLogFile()
setLogFile(java.lang.String)public void setAdvancedParam(java.lang.String key,
int value)
LSState.Stopped.key - Name of the parameter.value - Value of the parameter.public int getAdvancedParam(java.lang.String key)
LSState.Paused or LSState.Stopped.key - Name of the parameter.setAdvancedParam(String, int)public int getAdvancedParam(java.lang.String key,
int defaultValue)
key - Name of the parameter.defaultValue - Default value of the parameter.setAdvancedParam(String, int)public void setAdvancedParam(java.lang.String key,
double value)
LSState.Stopped.key - Name of the parameter.value - Value of the parameter.public double getAdvancedParam(java.lang.String key,
double defaultValue)
key - Name of the parameter.defaultValue - Default value of the parameter.setAdvancedParam(String, double)public void setAdvancedParam(java.lang.String key,
java.lang.String value)
LSState.Stopped.key - Name of the parameter.value - Value of the parameter.public java.lang.String getAdvancedParam(java.lang.String key,
java.lang.String defaultValue)
key - Name of the parameter.defaultValue - Default value of the parameter.setAdvancedParam(String, String)public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object