public class ResultStorageCSV extends ResultStorageAbstract
# commentaire [nom] [nom dimension1]:[semantique1];[semantique2];... [nom dimension2]:[semantique1];[semantique2];... ... [ligne blanche] [coordonnee1];[coordonnee2];...;[valeur] [coordonnee1];[coordonnee2];...;[valeur] [coordonnee1];[coordonnee2];...;[valeur] ...Exemple
MaMatrice Mois:Janvier;Fevrier;Mars Ville:Nantes;Paris;Nice 1;1;2;13.5 0;2;1;4.2
Modifier and Type | Field and Description |
---|---|
protected long |
bytesWritten
le nombre d'octet ecris sur le disque
|
protected int |
cacheStep
number of step in cache
|
protected HashSet<String> |
fileExistCache |
protected MatrixCSVHelper |
matrixCSVHelper |
protected int |
maxGapWithCurrentStepReadOnDisk
le plus vieux pas de temps demande par rapport au pas de temps courant
lu sur le disque
|
protected int |
numberOfResult
nombre total de resultat
|
protected int |
numberOfResultAsked
le nombre de resultat demande
|
protected int |
numberOfResultOnDisk
nombre de resultat reellement stocke sur disque
|
protected int |
numberOfResultReadInCache
le nombre de resultat lu dans le cache
|
protected int |
numberOfResultReadOnDisk
le nombre de resultat lu sur le disque
|
protected TimeStep |
startDiskStep
Le pas de temps a partir duquel il faut sauver les resultats sur disque
|
protected int |
storeOnDiskStep
number of step result to store on disk. 0 for none, negative for all result
|
decorator, enabledResult, simulation
Constructor and Description |
---|
ResultStorageCSV(SimulationStorage simulation) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFileExist(File f) |
void |
delete()
Delete all result for this result storage.
|
protected boolean |
fileExist(File f)
Method used to know if file result exist.
|
long |
getBytesWritten() |
protected Map<String,org.nuiton.math.matrix.MatrixND> |
getCacheForStep(TimeStep step) |
protected File |
getDirectory()
donne le repertoire de stockage des resultats
|
protected HashSet<String> |
getFileExistCache() |
String |
getInfo()
Return some information on result storage.
|
protected MatrixCSVHelper |
getMatrixCSVHelper() |
protected File |
getMatrixDirectory(String name)
Donne le repertoire de stockage pour un certain type de resultat matriciel
|
protected File |
getMatrixFile(TimeStep step,
String name) |
List<String> |
getResultName()
return list of all result name available
|
protected TimeStep |
getTimeStep(String file)
Extract and create TimeStep from file name.
|
protected boolean |
isDiskResult(TimeStep step)
Indique s'il faut sauver sur disque les resultats
|
protected org.nuiton.math.matrix.MatrixND |
readMatrix(String file) |
protected org.nuiton.math.matrix.MatrixND |
readResult(TimeStep step,
String name)
Return one result for step and name.
|
protected void |
writeActiveRule(TimeStep step,
String name,
String params)
Write active rule
|
protected void |
writeResult(TimeStep step,
String name,
org.nuiton.math.matrix.MatrixND mat)
write result
|
addActiveRule, addResult, addResult, addResult, addResult, addResult, addResult, addResult, addResult, addResult, afterSimulation, beforeSimulation, close, decorate, doAddResult, getLastStep, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrix, getMatrixFactory, getProvider, isEnabled, stepChange, undecorate, undecorate, undecorate
protected int storeOnDiskStep
protected int cacheStep
protected TimeStep startDiskStep
protected int numberOfResult
protected int numberOfResultOnDisk
protected int numberOfResultAsked
protected int numberOfResultReadInCache
protected int numberOfResultReadOnDisk
protected long bytesWritten
protected int maxGapWithCurrentStepReadOnDisk
protected MatrixCSVHelper matrixCSVHelper
public ResultStorageCSV(SimulationStorage simulation)
protected MatrixCSVHelper getMatrixCSVHelper()
public String getInfo()
ResultStorageAbstract
getInfo
in interface ResultStorage
getInfo
in class ResultStorageAbstract
protected File getDirectory()
protected File getMatrixDirectory(String name)
name
- protected boolean fileExist(File f)
f
- protected void addFileExist(File f)
protected org.nuiton.math.matrix.MatrixND readMatrix(String file) throws IOException
IOException
protected TimeStep getTimeStep(String file)
file
- public void delete()
ResultStorage
delete
in interface ResultStorage
delete
in class ResultStorageAbstract
protected org.nuiton.math.matrix.MatrixND readResult(TimeStep step, String name)
ResultStorageAbstract
readResult
in class ResultStorageAbstract
protected boolean isDiskResult(TimeStep step)
step
- protected Map<String,org.nuiton.math.matrix.MatrixND> getCacheForStep(TimeStep step)
protected void writeResult(TimeStep step, String name, org.nuiton.math.matrix.MatrixND mat)
ResultStorageAbstract
writeResult
in class ResultStorageAbstract
protected void writeActiveRule(TimeStep step, String name, String params)
ResultStorageAbstract
writeActiveRule
in class ResultStorageAbstract
public List<String> getResultName()
ResultStorageAbstract
getResultName
in interface ResultStorage
getResultName
in class ResultStorageAbstract
public long getBytesWritten()
Copyright © 1999–2020 CodeLutin. All rights reserved.