public class SingleGridProblemMediator extends GridProblemMediator
MetricDataset
s, where the
data type is AiTypeConst.ARRAYLIST
. This is so that it is stored and returned
as a single list and not as individual elements.bestOptValue, currentOptValue, intermediateBounds, lastGridSolution, maxSolutionsNumber, partProblemNumber, partProblemSize, wholeProblemSize
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 |
---|
SingleGridProblemMediator(org.licas.PasswordHandler thePasswordHandler)
Create a new instance of SingleGridProblemMediator.
|
Modifier and Type | Method and Description |
---|---|
Solution |
createNewSolution(java.lang.String solutionType,
org.ai_heuristic.eval.metric.MetricDataset problemDataset)
Create a new genetic solution with chromosomes, etc.
|
Result |
solve(TestSpec testSpec)
Optimise the solutions using the appropriate framework.
|
boolean |
updateSolutions(Result result)
This can be used to combine existing solutions to evolve new ones.
|
calcResultsBetter, calcTestEnded, copyToConfig, getMaxSolutionsNumber, getPartProblemNumber, getPartProblemSize, getResultsBetter, getResultXml, getWholeProblemSize, randomiseHashtableOrder, resetForNextRun, resetValues, restorePreviousSolutionSet, setMaxSolutionsNumber, setPartProblemNumber, setPartProblemSize, setWholeProblemSize, sortProblems
firstSolutionsAndProblems
solutionsToProcess
createStoreData, getProblemsList, getSolutionHierarchy, hasSolutions, readData
addHeuristicOption, clearHeuristicOptions, getFullTrace, getHeuristicOptions, getHeuristicType, getProblem, getProblemNames, getSolutionSet, getSolutionsNumber, getTestEnded, processResult, setDatasetType, setFullTrace, setHeuristicOptions, setHeuristicType, setProblem, setSolutionSet, setSolutionsNumber
public SingleGridProblemMediator(org.licas.PasswordHandler thePasswordHandler)
thePasswordHandler
- for storing passwords.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
heuristicOptions
object.
If this is empty, then it will create two new types - one through crossover and one
through mutation. If heuristicOptions specifies specific types on evolution, then it
will perform those only. It then tries to space the new solutions around the existing
solutions for the new grid structure.result
- the result generated by the problem solver.
Can be more solutions, references, or an error..java.lang.Exception
- any error.