public class Trial
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected AlgorithmStrategy |
_algorithmStrategy
the strategy used to pick the algorithm which generated this trial
|
protected java.lang.Object |
_customInfo
optional, custom information that an objective or evaluator may choose to store here for convenience
|
protected Problem |
_problem
the problem being solved
|
protected double |
_satisfaction
overall satisfaction provided by some solution judges
|
protected SearchAlgorithm |
_searchAlgorithm
the algorithm that generated this trial
|
protected TrialPoint |
_trialPoint
trial point of variable values
|
protected TrialVeto |
_veto
a veto if any
|
protected java.util.Map<Objective,Score> |
OBJECTIVE_SCORES
table of objective scores
|
Constructor and Description |
---|
Trial(Problem problem,
TrialPoint trialPoint)
Constructor.
|
Trial(Problem problem,
TrialPoint trialPoint,
SearchAlgorithm algorithm,
AlgorithmStrategy strategy)
Primary Constructor.
|
Modifier and Type | Method and Description |
---|---|
SearchAlgorithm |
getAlgorithm()
Get the search algorithm that generated this trial.
|
AlgorithmStrategy |
getAlgorithmStrategy()
Get the algorithm strategy that generated this trial.
|
java.lang.Object |
getCustomInfo()
Get optional, custom information (if any) that was provided for convenience.
|
Problem |
getProblem()
Get the problem.
|
double |
getSatisfaction()
Get the overall satisfaction which many solution judges provide.
|
double |
getSatisfaction(Objective objective)
Get the satisfaction for a specific objective.
|
Score |
getScore(Objective objective)
Get the score corresponding to the specified objective.
|
java.util.Map<Objective,Score> |
getScores()
Get the scores keyed by objective
|
TrialPoint |
getTrialPoint()
Get the trial point.
|
TrialVeto |
getVeto()
Get the trial veto if any
|
boolean |
isVetoed()
Determine if this trial has been vetoed
|
void |
setCustomInfo(java.lang.Object customInfo)
Provide optional, custom information for convenience
|
void |
setSatisfaction(double satisfaction)
Specify the overall satisfaction of this solution.
|
void |
setScore(Objective objective,
double value)
Set the scores of a trial point.
|
void |
setScore(Score score)
Set the scores of a trial point.
|
java.lang.String |
toString()
A string for displaying a trial.
|
void |
vetoTrial(TrialVeto veto)
Veto the trial.
|
protected final TrialPoint _trialPoint
protected final Problem _problem
protected final SearchAlgorithm _searchAlgorithm
protected final AlgorithmStrategy _algorithmStrategy
protected TrialVeto _veto
protected final java.util.Map<Objective,Score> OBJECTIVE_SCORES
protected double _satisfaction
protected java.lang.Object _customInfo
public Trial(Problem problem, TrialPoint trialPoint, SearchAlgorithm algorithm, AlgorithmStrategy strategy)
problem
- the problem being solvedtrialPoint
- the trial point of variable valuesalgorithm
- the algorithm that generated this trialstrategy
- the strategy used to pick the algorithm which generated this trialpublic Trial(Problem problem, TrialPoint trialPoint)
problem
- the problem being solvedtrialPoint
- the trial point of variable valuespublic void vetoTrial(TrialVeto veto)
veto
- the vetopublic TrialVeto getVeto()
public boolean isVetoed()
public void setScore(Score score)
score
- The new score valuepublic void setScore(Objective objective, double value)
objective
- The new score valuevalue
- The new score valuepublic Score getScore(Objective objective)
objective
- Description of the Parameterpublic double getSatisfaction(Objective objective)
objective
- The objective to get.public void setSatisfaction(double satisfaction)
satisfaction
- the overall satisfaction of this solutionpublic double getSatisfaction()
public Problem getProblem()
public TrialPoint getTrialPoint()
public SearchAlgorithm getAlgorithm()
public AlgorithmStrategy getAlgorithmStrategy()
public java.util.Map<Objective,Score> getScores()
public java.lang.Object getCustomInfo()
public void setCustomInfo(java.lang.Object customInfo)
customInfo
- the custom information to providepublic java.lang.String toString()
toString
in class java.lang.Object