Results

class archABM.results.Results(config: dict)[source]

Simulation history processing and export

output: dict
mkpath()None[source]

Creates the path where the simulation results should be saved.

If the directory option is specified, another folder level is added to the path.

mkdir()None[source]

Creates the directory where the simulation results should be saved.

setup_log()None[source]

Logging setup

open_people_csv()None[source]

Creates and opens the csv file to save people state history

close_people_csv()None[source]

Closes the people csv file

open_places_csv()None[source]

Creates and opens the csv file to save places state history

close_places_csv()None[source]

Closes the places csv file

open_json()None[source]

Creates and opens the json file to save all results

write_json()None[source]

Writes the output dictionary to the json file

close_json()None[source]

Closes the json file

init_results()None[source]

Initializes the results dictionary

write_person(person: archABM.person.Person)None[source]

Appends a new row to the person state history.

Parameters

person (Person) – person state to be saved

write_place(place: archABM.place.Place)None[source]

Appends a new row to the place state history.

Parameters

place (Place) – place state to be saved

write_config()None[source]

Writes the configuration dictionary into a json file.

done()None[source]

Closes all file connections and returns a dict with the complete simulation history.

Returns

complete simulation history

Return type

dict