-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split functionality into different files #25
Comments
changed data handling to use input config files instead of input dictionaries.
See #26 for how point number 2 above could be implemented. |
Basically my idea was to have both argline passed either here or in the 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.The text was updated successfully, but these errors were encountered: