This documentation version is related to the plugin version 0.90 for
Repast Symphony 2.0.0. The database outputter works analogous to a file
outputter extending log4j’s . Like the file outputter, the database
outputter is configured via a 2-step wizard reusing/extending the file
outputter and JDBC freezedryer wizards. The code should integrate well
into simphony as a plugin.
The performance of writing to a DB compared to a file is addressed by
adding the option to cache a certain number of SQL statements and
execute these at once. This might reduce the additional time to a
negligible amount. The advantage is to directly put data in the database
without getting confused about numerous files somewhere on the hard
disk.
Features include:
Caching of a definable number of outputs before SQL execution
Uses prepared statements (MySQL)
Configuration via 2-step wizard
Auto-completion for URL and driver in database properties wizard
step
Ability to test MySQL connection
Choose whether to store login information or to be prompted
Integrates well in Repast Simphony as plugin folder
Uses RS parameters to add information
RUN_ID
PARAM_SET_ID
Creates MySQL table if it does not exist
Run information management
The run information entry is usually made in the dabase at the first
loggin, even if caching is enabled. The run id for that entry is usually
indentified during the outputter’s initialisation during context
building (see table). An exception occurs when is called before.\
cc|l
| RUN_ID (RS) | run info table given | run id |
|---|---|---|
| set | yes | RUN_ID or next valid number |
| set | no | RUN_ID |
| not set | yes | MAX(runID) + 1 in run info |
| not set | no | MAX(runID) + 1 in result table |