jasmineRepo / JAS-mine-core

JAS-mine maintains and develops the JAS simulation platform, a discrete-event tool-kit for agent-based and dynamic microsimulation modelling. This repository contains the core libraries. See www.jas-mine.net for more details.
European Union Public License 1.2
2 stars 5 forks source link

ENH: Save graphs displayed in the simulation #20

Open pbronka opened 2 years ago

pbronka commented 2 years ago

We would like to add new functionality to have all graphs displayed in the simulation (by the observer) automatically saved to a new folder called Graphs in the "Output" folder.

vkhodygo commented 2 years ago

@pbronka Do you have any thoughts regarding the filenames? I used to include some metadata to discern different runs somehow.

P.S. Apparently, this issue should belong to the gui repository. P.P.S. I can't locate where the output folder is set in the project, any directions?

pbronka commented 2 years ago

Output folders are named with the date and time of the run - I suppose the same could be used in names of graphs, but a simple folder called "Graphs" inside of each generated output folder might also be sufficient. For runs initiated from the MultiRun class, I don't think we would like to save any graphs as they run without the GUI / observer, so graphs are not produced.

There already is a feature that allows saving graphs one by one in JAS-mine (right clicking a graph with the mouse and selecting save) so this should be just a matter of doing this automatically / adding a toggle to turn this on and off to the observer options.

Output folder is actually set by JAS-mine core: https://github.com/jasmineRepo/JAS-mine-core/blob/fa07b21137cbdd71af841354d2bdf0aa83bd9b3c/microsim-core/src/main/java/microsim/data/db/Experiment.java#L51