Package xal.extension.solver
Class Trial
java.lang.Object
xal.extension.solver.Trial
Trial keeps track of trial points.
- Author:
- ky6, t6p
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
optional, custom information that an objective or evaluator may choose to store here for conveniencetable of objective scoresprotected final Problem
the problem being solvedprotected double
overall satisfaction provided by some solution judgesprotected final SearchAlgorithm
the algorithm that generated this trialprotected final TrialPoint
trial point of variable valuesprotected TrialVeto
a veto if any -
Constructor Summary
ConstructorsConstructorDescriptionTrial
(Problem problem, TrialPoint trialPoint) Constructor.Trial
(Problem problem, TrialPoint trialPoint, SearchAlgorithm algorithm) Primary Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the search algorithm that generated this trial.Get optional, custom information (if any) that was provided for convenience.Get the problem.double
Get the overall satisfaction which many solution judges provide.double
getSatisfaction
(Objective objective) Get the satisfaction for a specific objective.Get the score corresponding to the specified objective.Get the scores keyed by objectiveGet the trial point.getVeto()
Get the trial veto if anyboolean
isVetoed()
Determine if this trial has been vetoedvoid
setCustomInfo
(Object customInfo) Provide optional, custom information for conveniencevoid
setSatisfaction
(double satisfaction) Specify the overall satisfaction of this solution.void
Set the scores of a trial point.void
Set the scores of a trial point.toString()
A string for displaying a trial.void
Veto the trial.
-
Field Details
-
trialPoint
trial point of variable values -
problem
the problem being solved -
searchAlgorithm
the algorithm that generated this trial -
veto
a veto if any -
objectiveScores
table of objective scores -
satisfaction
protected double satisfactionoverall satisfaction provided by some solution judges -
customInfo
optional, custom information that an objective or evaluator may choose to store here for convenience
-
-
Constructor Details
-
Trial
Primary Constructor.- Parameters:
problem
- the problem being solvedtrialPoint
- the trial point of variable valuesalgorithm
- the algorithm that generated this trial
-
Trial
Constructor.- Parameters:
problem
- the problem being solvedtrialPoint
- the trial point of variable values
-
-
Method Details
-
vetoTrial
Veto the trial.- Parameters:
veto
- the veto
-
getVeto
Get the trial veto if any- Returns:
- the trial veto or null if there is none
-
isVetoed
public boolean isVetoed()Determine if this trial has been vetoed- Returns:
- true if the trial has been vetoed and false if not
-
setScore
Set the scores of a trial point.- Parameters:
score
- The new score value
-
setScore
Set the scores of a trial point.- Parameters:
objective
- The new score valuevalue
- The new score value
-
getScore
Get the score corresponding to the specified objective.- Parameters:
objective
- Description of the Parameter- Returns:
- The score of the specified objective.
-
getSatisfaction
Get the satisfaction for a specific objective.- Parameters:
objective
- The objective to get.- Returns:
- The satisfaction.
-
setSatisfaction
public void setSatisfaction(double satisfaction) Specify the overall satisfaction of this solution.- Parameters:
satisfaction
- the overall satisfaction of this solution
-
getSatisfaction
public double getSatisfaction()Get the overall satisfaction which many solution judges provide.- Returns:
- the overall satisfaction of this solution
-
getProblem
Get the problem.- Returns:
- The problem.
-
getTrialPoint
Get the trial point.- Returns:
- The trial point.
-
getAlgorithm
Get the search algorithm that generated this trial.- Returns:
- The search algorithm.
-
getScores
Get the scores keyed by objective- Returns:
- Table of scores keyed by objective.
-
getCustomInfo
Get optional, custom information (if any) that was provided for convenience.- Returns:
- optional, custom information
-
setCustomInfo
Provide optional, custom information for convenience- Parameters:
customInfo
- the custom information to provide
-
toString
A string for displaying a trial. The string consist of a trial point and a score.
-