public abstract class Evaluator
extends java.lang.Object
ProblemSolverMediator
coordinates the, possibly distributed services
problem-solving framework, this mediator evaluates the created solution sets for
the problem solver, from a more centralised position.Modifier and Type | Field and Description |
---|---|
protected org.licas_xml.abs.Element |
lastTestResult
The last returned test result, which is stored as XML inside of this element.
|
protected Result |
result
The problem solving result.
|
protected org.licas_xml.abs.Element |
testResults
List of all test results, which are stored as XML inside of this element.
|
protected org.ai_heuristic.functs.FunctionMetric |
valueCompare
To compare result values
|
Constructor and Description |
---|
Evaluator()
Create a new instance of Evaluator
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
createFunctionMetric(TestSpec testSpec)
Create the function metric to evaluate solution results, for calculating some
stat values.
|
org.licas_xml.abs.Element |
getAllTestResults()
Get the results of all of the test runs in a single XML element.
|
Result |
getResult()
Get the last result object that was generated.
|
org.licas_xml.abs.Element |
getTestResult()
Get the result from the last test run only in an XML element.
|
abstract boolean |
initialiseMediator(TestSpec testSpec,
ProblemMediator probMediator)
Create or initialise the solution and problem values from the problem specification.
|
protected boolean |
isBetter(java.lang.Object bestValue,
java.lang.Object value)
Return true if the value is better than the best value.
|
protected org.licas_xml.abs.Element lastTestResult
protected org.licas_xml.abs.Element testResults
protected Result result
protected org.ai_heuristic.functs.FunctionMetric valueCompare
public abstract boolean initialiseMediator(TestSpec testSpec, ProblemMediator probMediator) throws java.lang.Exception
testSpec
- the specification describing the tests to run.probMediator
- the model of the problem with all required elements.java.lang.Exception
- any error.protected boolean isBetter(java.lang.Object bestValue, java.lang.Object value) throws java.lang.Exception
bestValue
- the best comparison value.value
- the value to measure.java.lang.Exception
- any error.protected boolean createFunctionMetric(TestSpec testSpec)
testSpec
- the test specification.public Result getResult()
public org.licas_xml.abs.Element getTestResult()
public org.licas_xml.abs.Element getAllTestResults()