Package net.simplace.sim.io.output
Class FWSimOutputManager
java.lang.Object
net.simplace.sim.io.output.FWSimOutputManager
With the output part of the main configuration xml the outputters are
instantiated in their given format and field (var-Map), frequence (Yearly,
Monthly, Daily, Complex) and generalization method (Sum,Mean,Max, Min,
Complex Rule (Value at day of Anthesis)) Singleton implementation Holds
different out putters for the model threads Ensures the efficient use of the
resources Takes data via VarMap and the containing SimVariables Values are
piped into the different output adapters Division between Data format and
content using IO Interfaces Able to abstract data access format as Database
via SQL Excel (csv) Uses File Access Pool and Connection Pool Have own
Threads for writing output
- Author:
- Andreas Enders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOutput(FWSimOutput aOutput) voidaddOutput(org.jdom2.Element aOutput, FWSimVarMap aVarMap, FWSimProject.PROJECT_MODE aProjectMode) adds an output to the list of outputs. for format description of the xml-structure seevoidcalculateStatistics(FWSimVarMap aVarMap) outputs the content of VarMap to all configured output adaptersbooleancheckSkipAboveSize(FWSimVarMap aVarMap) voidvoidfinishSimulationOutputs(FWSimVarMap aVarMap) removes the output caches from the outputs.getInterface(String aName) voidinitializeOutputs(FWSimVarMap aVarMap, FWSimProject.PROJECT_MODE aProject_MODE) booleanrun all output writers in own threads - started once after initializing the system.booleanvoidOUTPUT(LocalDateTime aCurrentDate, FWSimVarMap aVarMap, String aOutputType) outputs the content of VarMap to all configured output adaptersvoidoutputCalibrationResult(FWSimVarMap aVarMap) outputs the content of VarMap to all configured output adaptersvoidregisterOutputListener(FWSimOutputListener aOutputListener) voidregisterSimulations(List<FWSimSimulation> aSimulations) voidremoveAdapter(FWSimFieldContainer aFieldContainer) removes anFWSimOutputto remove it from solution - used in GUIvoidremoveOutputListener(FWSimOutputListener aOutputListener) voidreset()voidrun all output writers in own threads - started once after initializing the system.voidstop all output writers in own threads - stopped imediately after stopping the session once after initializing the system.voidupdateAdapter(FWSimVarMap aVarMap) updates theFWSimVarMapin all storedFWSimResourceCachebooleanupdateInterface(FWSimInterface<?> aInterface, FWSimVarMap aVarMap)
-
Constructor Details
-
FWSimOutputManager
- Parameters:
aFwSimSession-
-
-
Method Details
-
addOutput
public void addOutput(org.jdom2.Element aOutput, FWSimVarMap aVarMap, FWSimProject.PROJECT_MODE aProjectMode) adds an output to the list of outputs. for format description of the xml-structure see- Parameters:
aOutput-aVarMap-aProjectMode-- See Also:
-
addOutput
- Parameters:
aOutput- to add
-
getOutput
- Parameters:
aName-- Returns:
- the FWSimOutput with given name
-
OUTPUT
outputs the content of VarMap to all configured output adapters- Parameters:
aCurrentDate-aVarMap-aOutputType-
-
outputCalibrationResult
outputs the content of VarMap to all configured output adapters- Parameters:
aVarMap- Array of selected Simulations data
-
calculateStatistics
outputs the content of VarMap to all configured output adapters- Parameters:
aVarMap-
-
runOutputWriters
public void runOutputWriters()run all output writers in own threads - started once after initializing the system. -
stopOutputWriters
public void stopOutputWriters()stop all output writers in own threads - stopped imediately after stopping the session once after initializing the system. -
updateInterface
- Parameters:
aInterface-aVarMap-- Returns:
- true, if an interface was updated successfully, otherwise returns false
-
initializeOutputs
- Parameters:
aVarMap-aProject_MODE-
-
isOutputStillWriting
public boolean isOutputStillWriting()run all output writers in own threads - started once after initializing the system.- Returns:
- if output queue is still writing
-
reset
- Throws:
Exception- See Also:
-
getOutputAdapters
- Returns:
- all the output adapters
-
getInterface
- Parameters:
aName-- Returns:
- the connected Interface to the output adapters
-
registerOutputListener
- Parameters:
aOutputListener-
-
removeOutputListener
- Parameters:
aOutputListener-
-
registerSimulations
- Parameters:
aSimulations-
-
finishSimulationOutputs
removes the output caches from the outputs.- Parameters:
aVarMap-
-
clearSimulations
public void clearSimulations() -
isWriterThreadStarted
public boolean isWriterThreadStarted()- Returns:
- the isWriterThreadStarted
-
checkSkipAboveSize
- Parameters:
aVarMap-- Returns:
- if project should be skiped
-
updateAdapter
updates theFWSimVarMapin all storedFWSimResourceCache- Parameters:
aVarMap-
-
removeAdapter
removes anFWSimOutputto remove it from solution - used in GUI- Parameters:
aFieldContainer-
-