Skip to content

Keep all_optimizations.py and notebooks up to date with eachother #13

@rickyjericevich

Description

@rickyjericevich

Initially when I created all_optimizations.py, I made sure that the functions for each optimization therein held the exact same code as it's corresponding notebook. Eg: the fte() func had the exact same code as FTE.ipynb. This made it relatively easy to transfer any changes made in the notebooks to all_optimizations.py and vice versa.

The person(s) who recently made changes to all_optimizations.py did not transfer their changes to the notebooks, so the code in all_optimizations.py has become substantially different to the code in the notebooks (and rather messy imo). This makes it difficult and time consuming to add any new changes made in the notebooks to all_optimizations.py and vice versa.

As of right now, all_optimizations.py will probably produce different reconstruction results compared to the notebooks, and that's a problem. This must be fixed before we can merge the improvements from develop into main

I think the best (long-term) solution is to break up the code in each notebook into smaller, more manageable functions and place them in their own module. For example, there'll be one module for all the FTE code and one for EKF and so on. Perhaps the FTE module will have functions like plot_redescending_cost(), initialize_pyomo_model(), define_pyomo_constraints() or something similar.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions