Open alchemyst opened 8 years ago
See #26 for how point number 2 above could be implemented.
Basically my idea was to have both argline passed either here https://github.com/Stefan-Endres/DWPM-Mixture-Model/commit/bfde812f8a039d86849519c3f767244fbd765b94#diff-a15fc2cbdf6b0301e50f73116ee658acR20
or in the main.py
directly after the directly after the ImportData()
class init (before the inputs are actually used to read the data) which I think would be easier to write, this is messier, but will allow for both running from commandline/IDE scripts and by just editing the config files (so anyone new to the project doesn't have to run from the command line to simulate a non-default system).
I will definitely split the plotting.
Also note, even if you prefer the idea of editing a file to set the simulation parameters, that it will be a good idea to separate out the slow-changing config stuff from the simulation setup stuff. I recommend having one config file for stuff like paths and then having separate files for each simulation case you want to run. A good mental test is to thing whether it will be possible to run two (or more) sets of simulations at the same time with the system you consider.
Have a look at this project from another student of mine to see how the "case config" system works. This way we can add many different cases which we can re-run one by one or all at once if we want to excercise the code, rather than having to edit the single config file repeatedly to get all the results we need. He is using json files (also built in to the standard library) to store the case configuration. This matches closely with your current dictionary-based format.
The current workflow is 1. edit the config file 2. run the script. This has issues with for instance automating running the script for different sets of components in an automated fasion.
I recommend the following idea:
This gets rid of many conditionals in your simulation program, making it a lot cleaner. Your
main.py
is a step in the same direction, but I think you will find splitting the plotting code from the calculation code with a data file in between makes a lot of the logic easier.