public abstract class AbstractCapsisBridgeClient
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractCapsisBridgeClient.TestHelper
Only used for helping unit test.
|
| Modifier and Type | Field and Description |
|---|---|
protected AbstractCapsisBridgeClient.TestHelper |
testHelper |
| Constructor and Description |
|---|
AbstractCapsisBridgeClient() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addSimulationResult(java.lang.String stratumGroup,
int initialAgeYr,
CBSimulationResult result)
Adds a simulation result to the MetaModelManager
|
abstract void |
closeProject()
Closes the project
|
abstract void |
fitMetaModels()
Fits the metamodels on the previously given simulation results for all StratumGroupIDs.
|
abstract void |
freeAndReportMemory()
Debug only method : calls GC and reports used memory.
|
abstract CBDataSet |
getMetaModelResult(java.lang.String stratumGroup)
Gets the fitted metamodel simulation results
|
abstract java.util.List<CBModelDataField> |
getModelDataFields()
Gets the model data fields
|
abstract java.util.List<java.lang.String> |
getPossibleOutputTypes(java.lang.String stratumGroup)
Gets the metamodel possible output types.
|
abstract double |
getPrediction(java.lang.String stratumGroup,
int ageYr,
int timeSinceInitialDateYr,
java.lang.String outputType)
Gets a metamodel prediction for a particular stratumGroup
|
abstract java.util.Map<java.lang.String,java.lang.String> |
getVersion()
Gets the CAPSIS and bridge versions
|
static void |
info(java.lang.String msg,
java.lang.Object... params)
Utility method.
|
abstract void |
load(java.lang.String fileName)
Loads a metamodel to a file
|
abstract CBSimulationResult |
runSimulation()
Runs the simulation using the given initialParameters, evolutionParameters and data.
|
abstract void |
save(java.lang.String fileName)
Saves a metamodel to a file
|
abstract void |
sendData(java.util.ArrayList<java.util.List<java.lang.String>> data)
Sends the model data
|
abstract void |
setEvolutionParameters(CBEvolutionParameters evolutionParameters)
Sets the evolution parameters
|
abstract void |
setFieldMatches(java.lang.Integer[] matches)
Sets the field matches
|
abstract void |
setInitialModelParameters(CBModelParameters modelParameters)
Sets the initial model parameters
|
void |
setTestHelper(AbstractCapsisBridgeClient.TestHelper testHelper)
Only used for helping unit test.
|
abstract void |
shutDownNow()
Stops the corresponding service now.
|
static void |
warning(java.lang.String msg,
java.lang.Object... params)
Utility method.
|
protected AbstractCapsisBridgeClient.TestHelper testHelper
public abstract java.util.List<CBModelDataField> getModelDataFields() throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic abstract void setInitialModelParameters(CBModelParameters modelParameters) throws java.lang.RuntimeException
modelParameters - the initial model parameters to set.java.lang.RuntimeExceptionpublic abstract void setFieldMatches(java.lang.Integer[] matches)
throws java.lang.RuntimeException
matches - the field matches array specifying the field index order.java.lang.RuntimeExceptionpublic abstract void setEvolutionParameters(CBEvolutionParameters evolutionParameters) throws java.lang.RuntimeException
evolutionParameters - the evolution parameters to set.java.lang.RuntimeExceptionpublic abstract CBSimulationResult runSimulation() throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic abstract void sendData(java.util.ArrayList<java.util.List<java.lang.String>> data)
throws java.lang.RuntimeException
data - the model data to send to Capsis (represented in an arrayList of Lists of string values).java.lang.RuntimeExceptionpublic abstract void closeProject()
throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic abstract void freeAndReportMemory()
throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic abstract java.util.Map<java.lang.String,java.lang.String> getVersion()
throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic abstract void addSimulationResult(java.lang.String stratumGroup,
int initialAgeYr,
CBSimulationResult result)
throws java.lang.RuntimeException
stratumGroup - The stratum group id to add the simulation results toinitialAgeYr - The initial age year of this stratum groupresult - The simulations results (given by getSimulationResult)java.lang.RuntimeExceptionpublic abstract void fitMetaModels()
throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic abstract java.util.List<java.lang.String> getPossibleOutputTypes(java.lang.String stratumGroup)
throws java.lang.RuntimeException
stratumGroup - The stratumGroup for which we want the possible output types.java.lang.RuntimeExceptionfitMetaModels(),
getPrediction(String, int, int, String)public abstract double getPrediction(java.lang.String stratumGroup,
int ageYr,
int timeSinceInitialDateYr,
java.lang.String outputType)
throws java.lang.RuntimeException
stratumGroup - The stratum group IDageYr - the age of the desired predictiontimeSinceInitialDateYr - The number of years elapsed since initialDateYear for ageYroutputType - A string specifying the desired output. This value must be taken from the SimulationResult.DataSet.Observation values.java.lang.RuntimeExceptionpublic abstract CBDataSet getMetaModelResult(java.lang.String stratumGroup) throws java.lang.RuntimeException
stratumGroup - The stratum group IDjava.lang.RuntimeExceptionpublic abstract void save(java.lang.String fileName)
throws java.lang.RuntimeException
fileName - The filename to save the metamodel tojava.lang.RuntimeExceptionpublic abstract void load(java.lang.String fileName)
throws java.lang.RuntimeException
fileName - The filename to load the metamodel fromjava.lang.RuntimeExceptionpublic abstract void shutDownNow()
public static void info(java.lang.String msg,
java.lang.Object... params)
msg - The message to logparams - any other paramspublic static void warning(java.lang.String msg,
java.lang.Object... params)
msg - The message to logparams - any other paramspublic void setTestHelper(AbstractCapsisBridgeClient.TestHelper testHelper)