public class SearchProblemMediator extends IterateMediatorEvolve
resultsBetter
dataHash, serviceNames, solutionHierarc
bestResult, fullTrace, problem, result, solutionOrder, solutionSet, solutionsNumber, solverType, testEnded
constructorParams, createServices, dataConditions, datasetType, dirPath, externalScript, heuristicOptions, heuristicType, inputVariables, linkSpec, metricType, serverSpec, serviceClasses, serviceJarFiles, servicesNum, serviceType, tokenizer
Constructor and Description |
---|
SearchProblemMediator(org.licas.PasswordHandler thePasswordHandler)
Create a new instance of SearchProblemMediator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
calcTestEnded(MatchResult solutionSet)
Check for conditions that indicate that the test runs have or should be
terminated.
|
Solution |
createNewSolution(java.lang.String solutionType,
org.ai_heuristic.eval.metric.MetricDataset problemDataset)
Create a new genetic solution with chromosomes, etc.
|
org.licas_xml.abs.Element |
getResultXml()
Get the results of the test.
|
boolean |
resetForNextRun(java.util.HashMap varList)
Reset the problem-solving structures for the next run.
|
Result |
solve(TestSpec testSpec)
Optimise the solutions using the appropriate framework.
|
protected void |
sortProblems(TestSpec testSpec,
java.lang.String separator)
Try to (re)sort the problem list after making appropriate changes.
|
boolean |
updateSolutions(Result result)
This can be used to combine existing solutions to evolve or expand new ones.
|
firstSolutionsAndProblems
getResultsBetter, resetValues, solutionsToProcess
createStoreData, getProblemsList, getSolutionHierarchy, hasSolutions, readData
addHeuristicOption, clearHeuristicOptions, copyToConfig, getFullTrace, getHeuristicOptions, getHeuristicType, getProblem, getProblemNames, getSolutionSet, getSolutionsNumber, getTestEnded, processResult, setDatasetType, setFullTrace, setHeuristicOptions, setHeuristicType, setProblem, setSolutionSet, setSolutionsNumber
public SearchProblemMediator(org.licas.PasswordHandler thePasswordHandler)
thePasswordHandler
- for storing passwords.protected void sortProblems(TestSpec testSpec, java.lang.String separator) throws java.lang.Exception
testSpec
- the test specification describing the test run.separator
- the tokenizer character.java.lang.Exception
- any error.public Result solve(TestSpec testSpec) throws java.lang.Exception
testSpec
- the model of the tests to perform.java.lang.Exception
- any error.public Solution createNewSolution(java.lang.String solutionType, org.ai_heuristic.eval.metric.MetricDataset problemDataset) throws java.lang.Exception
Integer
, Float
, or
String
, primarily for testing purposes only.solutionType
- the type of solution to create.problemDataset
- the problem dataset to create the solution with.java.lang.Exception
- any error.public boolean updateSolutions(Result result) throws java.lang.Exception
result
- the result generated by the problem solver.
Can be more solutions, references, or an error..java.lang.Exception
- any error.public boolean resetForNextRun(java.util.HashMap varList) throws java.lang.Exception
resetForNextRun
in class ProblemMediator
varList
- a list of variables as key-value pairs. Needs to include the test spec.java.lang.Exception
- any error.protected void calcTestEnded(MatchResult solutionSet) throws java.lang.Exception
calcTestEnded
in class IterateMediatorCentral
solutionSet
- the last solution set to evaluate.java.lang.Exception
- any error.public org.licas_xml.abs.Element getResultXml() throws java.lang.Exception
java.lang.Exception
- any error.