public abstract class ResultStorageAbstract extends Object implements SimulationResultListener, SimulationResultGetter, ResultStorage
Modifier and Type | Field and Description |
---|---|
protected EntitySemanticsDecorator |
decorator |
protected Set<String> |
enabledResult
result enabled
|
protected SimulationStorage |
simulation |
Constructor and Description |
---|
ResultStorageAbstract(SimulationStorage simulation)
Les ResultStorage ne doivent pas etre instancier directement, mais
recuperer a partir d'un
SimulationStorage.getResultStorage() |
Modifier and Type | Method and Description |
---|---|
void |
addActiveRule(TimeStep step,
Rule rule) |
void |
addResult(boolean force,
TimeStep step,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(boolean force,
TimeStep step,
Population pop,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(boolean force,
TimeStep step,
String name,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(boolean force,
TimeStep step,
String name,
Population pop,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(SimulationContext context,
TimeStep step,
String name,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(TimeStep step,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(TimeStep step,
Population pop,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(TimeStep step,
String name,
org.nuiton.math.matrix.MatrixND mat) |
void |
addResult(TimeStep step,
String name,
Population pop,
org.nuiton.math.matrix.MatrixND mat) |
void |
afterSimulation(SimulationContext context)
called after simulation
|
void |
beforeSimulation(SimulationContext context)
called before simulation
|
void |
close()
Close result storage.
|
protected org.nuiton.math.matrix.MatrixND |
decorate(org.nuiton.math.matrix.MatrixND mat,
org.nuiton.topia.TopiaContext tx) |
void |
delete()
Delete all result for this result storage.
|
protected void |
doAddResult(TimeStep step,
String name,
org.nuiton.math.matrix.MatrixND mat) |
String |
getInfo()
Return some information on result storage.
|
TimeStep |
getLastStep()
Get last simulation date.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(List<TimeStep> steps,
Population pop,
String name)
Retourne la matrice stocke pour des pas de temps
|
org.nuiton.math.matrix.MatrixND |
getMatrix(List<TimeStep> steps,
Population pop,
String name,
org.nuiton.topia.TopiaContext tx) |
org.nuiton.math.matrix.MatrixND |
getMatrix(List<TimeStep> steps,
String name) |
org.nuiton.math.matrix.MatrixND |
getMatrix(List<TimeStep> steps,
String name,
org.nuiton.topia.TopiaContext tx)
Retourne la matrice stocke pour des pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(Population pop,
String name)
Retourne une matrice contenant tous les pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(Population pop,
String name,
org.nuiton.topia.TopiaContext tx)
Retourne une matrice contenant tous les pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(SimulationContext context,
List<TimeStep> steps,
String name)
Retourne la matrice stocke pour un ensemble de pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(SimulationContext context,
String name)
Retourne une matrice contenant tous les pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(SimulationContext context,
TimeStep step,
String name)
Retourne la matrice stocke pour un pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(String name)
Retourne une matrice contenant tous les pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(String name,
org.nuiton.topia.TopiaContext tx)
Retourne une matrice contenant tous les pas de temps.
|
org.nuiton.math.matrix.MatrixND |
getMatrix(TimeStep step,
Population pop,
String name)
Retourne la matrice stocke pour un pas de temps
|
org.nuiton.math.matrix.MatrixND |
getMatrix(TimeStep step,
Population pop,
String name,
org.nuiton.topia.TopiaContext tx)
Retourne la matrice stocke pour un pas de temps
|
org.nuiton.math.matrix.MatrixND |
getMatrix(TimeStep step,
String name) |
org.nuiton.math.matrix.MatrixND |
getMatrix(TimeStep step,
String name,
org.nuiton.topia.TopiaContext tx)
Retourne une matrice contenant tous les pas de temps.
|
protected org.nuiton.math.matrix.MatrixFactory |
getMatrixFactory()
sub class can overwrite this method to return specifique factory
|
protected EntitySemanticsDecorator.EntityProvider |
getProvider(org.nuiton.topia.TopiaContext tx)
Try to find better tx.
|
abstract List<String> |
getResultName()
return list of all result name available
|
boolean |
isEnabled(String name)
Deprecated.
since 4.4.0.0 : this method is duplicated with ResultManager#isEnabled(String)
|
protected abstract org.nuiton.math.matrix.MatrixND |
readResult(TimeStep step,
String name)
Return one result for step and name.
|
void |
stepChange(SimulationContext context,
TimeStep step)
Receive event when simulation change step
|
protected List<String> |
undecorate(List l)
return new list with undecorate item
|
protected org.nuiton.math.matrix.MatrixND |
undecorate(org.nuiton.math.matrix.MatrixND mat)
Return undecorated version of matrix in argument
|
protected String |
undecorate(Object o) |
protected abstract void |
writeActiveRule(TimeStep step,
String name,
String params)
Write active rule
|
protected abstract void |
writeResult(TimeStep step,
String name,
org.nuiton.math.matrix.MatrixND mat)
write result
|
protected SimulationStorage simulation
protected EntitySemanticsDecorator decorator
public ResultStorageAbstract(SimulationStorage simulation)
SimulationStorage.getResultStorage()
simulation
- storage to get resultprotected abstract org.nuiton.math.matrix.MatrixND readResult(TimeStep step, String name)
step
- name
- protected abstract void writeResult(TimeStep step, String name, org.nuiton.math.matrix.MatrixND mat)
step
- name
- mat
- protected abstract void writeActiveRule(TimeStep step, String name, String params)
step
- name
- params
- public abstract List<String> getResultName()
getResultName
in interface ResultStorage
protected org.nuiton.math.matrix.MatrixFactory getMatrixFactory()
public String getInfo()
getInfo
in interface ResultStorage
protected org.nuiton.math.matrix.MatrixND decorate(org.nuiton.math.matrix.MatrixND mat, org.nuiton.topia.TopiaContext tx)
protected org.nuiton.math.matrix.MatrixND undecorate(org.nuiton.math.matrix.MatrixND mat)
mat
- protected List<String> undecorate(List l)
l
- public void delete()
ResultStorage
delete
in interface ResultStorage
public void close()
ResultStorage
close
in interface ResultStorage
public void addResult(TimeStep step, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
public void addResult(TimeStep step, Population pop, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
public void addResult(boolean force, TimeStep step, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
public void addResult(boolean force, TimeStep step, Population pop, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
public void addResult(TimeStep step, String name, Population pop, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
public void addResult(TimeStep step, String name, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
public void addResult(boolean force, TimeStep step, String name, Population pop, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
public void addResult(boolean force, TimeStep step, String name, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface ResultStorage
IsisFishException
protected void doAddResult(TimeStep step, String name, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
IsisFishException
public boolean isEnabled(String name)
isEnabled
in interface ResultStorage
name
- result nametrue
if result is enabledpublic void addActiveRule(TimeStep step, Rule rule) throws IsisFishException
addActiveRule
in interface ResultStorage
IsisFishException
public org.nuiton.math.matrix.MatrixND getMatrix(TimeStep step, Population pop, String name)
getMatrix
in interface ResultStorage
step
- le pas de temps que l'on souhaitepop
- la population pour lequelle on souhaite le resultatname
- le nom des resultats dont on veut la matricepublic org.nuiton.math.matrix.MatrixND getMatrix(TimeStep step, Population pop, String name, org.nuiton.topia.TopiaContext tx)
getMatrix
in interface ResultStorage
step
- le pas de temps que l'on souhaitepop
- la population pour lequelle on souhaite le resultatname
- le nom des resultats dont on veut la matricepublic org.nuiton.math.matrix.MatrixND getMatrix(TimeStep step, String name)
getMatrix
in interface ResultStorage
public org.nuiton.math.matrix.MatrixND getMatrix(TimeStep step, String name, org.nuiton.topia.TopiaContext tx)
getMatrix
in interface ResultStorage
name
- le nom des resultats dont on veut une matrice globale.step
- le pas de temps que l'on souhaitetx
- TopiaContext a utiliser pour recuperer les resultats et donc les semantiquespublic org.nuiton.math.matrix.MatrixND getMatrix(Population pop, String name)
getMatrix
in interface ResultStorage
pop
- la population pour lequel on souhaite la matricename
- le nom des resultats dont on veut une matrice globale.public org.nuiton.math.matrix.MatrixND getMatrix(Population pop, String name, org.nuiton.topia.TopiaContext tx)
ResultStorage
getMatrix
in interface ResultStorage
pop
- la population pour lequel on souhaite la matricename
- le nom des resultats dont on veut une matrice globale.tx
- la transaction a utiliserpublic org.nuiton.math.matrix.MatrixND getMatrix(String name)
getMatrix
in interface ResultStorage
name
- le nom des resultats dont on veut une matrice globale.public org.nuiton.math.matrix.MatrixND getMatrix(String name, org.nuiton.topia.TopiaContext tx)
getMatrix
in interface ResultStorage
name
- le nom des resultats dont on veut une matrice globale.tx
- TopiaContext a utiliser pour recuperer les resultats et donc les semantiquespublic org.nuiton.math.matrix.MatrixND getMatrix(List<TimeStep> steps, Population pop, String name)
ResultStorage
getMatrix
in interface ResultStorage
steps
- les pas de temps que l'on souhaitepop
- la population pour lequelle on souhaite le resultatname
- le nom des resultats dont on veut la matricepublic org.nuiton.math.matrix.MatrixND getMatrix(List<TimeStep> steps, Population pop, String name, org.nuiton.topia.TopiaContext tx)
getMatrix
in interface ResultStorage
public org.nuiton.math.matrix.MatrixND getMatrix(List<TimeStep> steps, String name)
getMatrix
in interface ResultStorage
public org.nuiton.math.matrix.MatrixND getMatrix(List<TimeStep> steps, String name, org.nuiton.topia.TopiaContext tx)
ResultStorage
getMatrix
in interface ResultStorage
steps
- les pas de temps que l'on souhaitename
- le nom des resultats dont on veut la matricetx
- TopiaContext a utiliser pour recuperer les resultats et donc les semantiquesnull
si aucune matrice ne correspond a
la demande.public TimeStep getLastStep()
getLastStep
in interface ResultStorage
public void addResult(SimulationContext context, TimeStep step, String name, org.nuiton.math.matrix.MatrixND mat) throws IsisFishException
addResult
in interface SimulationResultListener
IsisFishException
public org.nuiton.math.matrix.MatrixND getMatrix(SimulationContext context, TimeStep step, String name)
SimulationResultGetter
getMatrix
in interface SimulationResultGetter
step
- le pas de temps que l'on souhaitename
- le nom des resultats dont on veut la matricepublic org.nuiton.math.matrix.MatrixND getMatrix(SimulationContext context, List<TimeStep> steps, String name)
SimulationResultGetter
getMatrix
in interface SimulationResultGetter
steps
- les pas de temps que l'on souhaitename
- le nom des resultats dont on veut la matricepublic org.nuiton.math.matrix.MatrixND getMatrix(SimulationContext context, String name)
SimulationResultGetter
getMatrix
in interface SimulationResultGetter
name
- le nom des resultats dont on veut une matrice globale.protected EntitySemanticsDecorator.EntityProvider getProvider(org.nuiton.topia.TopiaContext tx)
tx
- public void afterSimulation(SimulationContext context)
SimulationListener
afterSimulation
in interface SimulationListener
public void beforeSimulation(SimulationContext context)
SimulationListener
beforeSimulation
in interface SimulationListener
public void stepChange(SimulationContext context, TimeStep step)
SimulationListener
stepChange
in interface SimulationListener
step
- new StepCopyright © 1999–2020 CodeLutin. All rights reserved.