public abstract class CentralProblemMediator extends ProblemMediator implements CentralMediatorDef
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap |
dataHash
List of data elements
|
protected java.util.ArrayList |
serviceNames
List of service names
|
protected java.util.ArrayList |
solutionHierarc
Hierarchical / structural list of iterated solutions
|
bestResult, fullTrace, problem, result, solutionsList, solutionsNumber, solutionsOrder, solverType, testEnded
constructorParams, createServices, dataConditions, datasetType, dirPath, externalScript, heuristicOptions, heuristicType, inputVariables, linkSpec, metricType, serverSpec, serviceClasses, serviceJarFiles, servicesNum, serviceType, tokenizer
Constructor and Description |
---|
CentralProblemMediator(org.licas.PasswordHandler thePasswordHandler)
Create a new instance of CentralProblemMediator.
|
Modifier and Type | Method and Description |
---|---|
Solution |
createNewSolution(java.lang.String solutionType,
org.ai_heuristic.eval.metric.MetricDataset problemDataset)
Create a new solution by evolving existing ones.
|
protected void |
createStoreData(TestSpec testSpec)
Create a new set of problem datasets.
|
void |
firstSolutionsAndProblems(TestSpec testSpec)
Generate a number of initial problem solutions based on the test spec.
|
protected java.util.ArrayList |
getProblemsList(TestSpec testSpec)
Retrieve or generate the problems list from data files or services.
|
protected java.util.ArrayList |
readData(java.lang.String filePath,
java.lang.String separator)
Read a data file of values suitable for the entropy grid.
|
void |
resetValues()
Reset to starting values
|
addHeuristicOption, clearHeuristicOptions, copyToConfig, getFullTrace, getHeuristicOptions, getHeuristicType, getProblem, getSolutionsList, getSolutionsNumber, getTestEnded, processResult, resetForNextRun, setDatasetType, setFullTrace, setHeuristicOptions, setHeuristicType, setProblem, setSolutionsList, setSolutionsNumber
getDatasetType, getDirFolder, getTokenizer, parseProblemDataset, setDirFolder, setToknizer, validateScript, validateVariable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResultXml, solve
protected java.util.ArrayList serviceNames
protected java.util.ArrayList solutionHierarc
protected java.util.HashMap dataHash
public CentralProblemMediator(org.licas.PasswordHandler thePasswordHandler)
thePasswordHandler
- for storing passwords.public void resetValues()
resetValues
in class ProblemMediator
protected void createStoreData(TestSpec testSpec) throws java.lang.Exception
','
-style separator in the file.testSpec
- the model of the tests to perform.java.lang.Exception
- any error.protected java.util.ArrayList readData(java.lang.String filePath, java.lang.String separator) throws java.lang.Exception
filePath
- the path to a local file. Values only, separated by commas.separator
- the tokenizer character.java.lang.Exception
- any error.protected java.util.ArrayList getProblemsList(TestSpec testSpec) throws java.lang.Exception
testSpec
- the test specification.java.lang.Exception
- any error.public void firstSolutionsAndProblems(TestSpec testSpec) throws java.lang.Exception
testSpec
- the test specification.java.lang.Exception
- any error.public Solution createNewSolution(java.lang.String solutionType, org.ai_heuristic.eval.metric.MetricDataset problemDataset) throws java.lang.Exception
createNewSolution
in interface CentralMediatorDef
solutionType
- the type of solution to create.problemDataset
- the problem dataset to create the solution with.java.lang.Exception
- any error.