Package jline.solvers
Class EnsembleSolver
java.lang.Object
jline.solvers.Solver
jline.solvers.EnsembleSolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Network[]protected intprotected Map<Integer, Map<Integer, SolverResult>> protected NetworkSolver[]protected ExecutorService -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEnsembleSolver(String name) protectedEnsembleSolver(Ensemble ensModel, String name) protectedEnsembleSolver(Ensemble ensModel, String name, SolverOptions options) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract SolverResultanalyze(int it, int e) protected abstract booleanconverged(int it) static SolverOptionsprotected AvgTableprotected abstract voidfinish()protected abstract AvgTableintintgetSolver(int e) Returns the child solver associated with sub-model (stage)e.getStageResult(int e) Returns the latest per-stageSolverResultfor sub-modele, as held by its child solver (ornullif not yet solved).protected abstract voidinit()booleanAn ensemble solver is stochastic if any of its submodel solvers is stochastic.protected voiditerate()intintprotected abstract voidpost(int it) protected abstract voidpre(int it) voidvoidvoidsetNumThreads(int numThreads) Methods inherited from class jline.solvers.Solver
getMethodFeatureSet, getName, getOptions, getResults, hasResults, isJavaAvailable, isStochasticMethod, isValidOption, listValidOptions, parseOptions, parseOptions, reset, resetRandomGeneratorSeed, resolveMethod, runAnalyzer, runAnalyzerChecks, selectMethod, setChecks, setOptions, supports, supportsModelMethod, timeExceeded
-
Field Details
-
ensemble
-
solvers
-
results
-
threadPool
-
numThreads
protected int numThreads
-
-
Constructor Details
-
EnsembleSolver
-
EnsembleSolver
-
EnsembleSolver
-
-
Method Details
-
defaultOptions
-
analyze
-
converged
protected abstract boolean converged(int it) -
finish
protected abstract void finish() -
getEnsembleAvg
-
getNumberOfModels
public int getNumberOfModels() -
isStochastic
public boolean isStochastic()An ensemble solver is stochastic if any of its submodel solvers is stochastic. Each submodel solver classifies itself, including from the method it resolved at runtime.- Overrides:
isStochasticin classSolver- Returns:
- true if any submodel solver returns stochastic estimates
-
getSolver
Returns the child solver associated with sub-model (stage)e.- Parameters:
e- the sub-model index (0-based)- Returns:
- the
NetworkSolversolving sub-modele
-
getStageResult
Returns the latest per-stageSolverResultfor sub-modele, as held by its child solver (ornullif not yet solved).- Parameters:
e- the sub-model index (0-based)- Returns:
- the per-stage solver result
-
setNumThreads
public void setNumThreads(int numThreads) -
getNumThreads
public int getNumThreads() -
init
protected abstract void init() -
iterate
protected void iterate() -
post
protected abstract void post(int it) -
pre
protected abstract void pre(int it) -
printEnsembleAvgTables
public void printEnsembleAvgTables() -
printEnsembleAvgTs
public void printEnsembleAvgTs() -
numberOfModels
public int numberOfModels() -
ensembleAvg
-
numThreads
public int numThreads()
-