|
|
|
The "fameSetup.yaml" is used to tell FAME-Core how to run a simulation, which model packages to look for and how the output file is named.
|
|
|
|
By default, FAME-Core searches for a file named "fameSetup.yaml" in the current working directory.
|
|
|
|
However, another filepath can be specified to FAME-Core using its `-s` command line option.
|
|
|
|
|
|
|
|
## Structure & Defaults
|
|
|
|
The options (and their defaults) are as follows:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
outputPath: "./result/"
|
|
|
|
outputFilePrefix: "FameResult"
|
|
|
|
outputFileTimeStamp: True
|
|
|
|
|
|
|
|
agentPackages: []
|
|
|
|
|
|
|
|
messagePackages: []
|
|
|
|
|
|
|
|
portablePackages: []
|
|
|
|
```
|
|
|
|
|
|
|
|
## Details
|
|
|
|
### Output options
|
|
|
|
Optional specifications for the output file to be generated by FAME-Core.
|
|
|
|
|
|
|
|
* `outputPath` path to store the output files in; absolute or relative to the current working directory; trailing "/" can be omitted; **Important:** This path must exist before starting the simulation!
|
|
|
|
* `outputFilePrefix` file name of the output files to be generated; Attention: if the file already exists it will be replaced with each run of FAME-Core *if* outputFileTimeStamp is set to "False".
|
|
|
|
* `outputFileTimeStamp` boolean; if set to `True`, a time stamp resembling the start of the simulation will be included in the file name, thus preventing from overwriting of output files (if consecutive simulations are started with a delay of a few seconds at least). If `False`, no time stamp is attached to the file name.
|
|
|
|
|
|
|
|
### Package options
|
|
|
|
Package specifications tell FAME-Core in which package to look for model classes, i.e. classes you programmed for your model.
|
|
|
|
It is **absolutely mandatory** to specify these parameters - otherwise FAME-Core will not be able to execute your simulation code.
|
|
|
|
|
|
|
|
All items require *fully qualified package names*:
|
|
|
|
* `agentPackages` list of all packages where you put your Agent classes in (i.e. classes extending FAME-Core's base class `Agent`); You need not specify all packages individually, but may also give the name of a top-level package that includes your agents within sub-packages therein.
|
|
|
|
* `messagePackages` list of all packages where you defined DataItem classes in (i.e. classes extending FAME-Core's base class `DataItem`); you can specify top-level package names as sub-packages are also searched.
|
|
|
|
* `messagePackages` list of all packages where you defined Portable classes in (i.e. classes implementing FAME's `Portable` interface); again, you can use top-level package names to include classes in sub-packages.
|
|
|
|
|
|
|
|
Do not confuse the fully qualified package name with the file path.
|
|
|
|
In case you are unsure what the fully qualified package name of your class is: Open the class's Java file and check the "package" statement in the first line.
|
|
|
|
|
|
|
|
# Example code
|
|
|
|
Please see this file content taken from the FAME-Demo project:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
outputPath: "./result/"
|
|
|
|
outputFilePrefix: "FameDemoOutput"
|
|
|
|
outputFileTimeStamp: True
|
|
|
|
|
|
|
|
agentPackages:
|
|
|
|
- "agents"
|
|
|
|
|
|
|
|
messagePackages:
|
|
|
|
- "msg"
|
|
|
|
|
|
|
|
portablePackages:
|
|
|
|
- "portableItems"
|
|
|
|
``` |
|
|
|
\ No newline at end of file |