Skip to content
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

Improve how we analyze results #104

Open
Tracked by #107
staadecker opened this issue Aug 5, 2021 · 0 comments
Open
Tracked by #107

Improve how we analyze results #104

staadecker opened this issue Aug 5, 2021 · 0 comments
Labels
dev-tools Related to tools and features used during development discussion enhancement Medium Priority

Comments

@staadecker
Copy link
Collaborator

staadecker commented Aug 5, 2021

Problem

  1. Creating output tables for analysis is cumbersome. Right now, output tables (csv files) are created in post_solve(). However post_solve() only gets run once after the model is solved. What if we want to create a table after we already have our results?

  2. We don't have a mechanism for creating comparison tables. Currently, running switch comapre will create comparison graphs but not tables. Yet often we want to compare specific values across multiple scenarios.

  3. We can't easily re-use graphing helper functions outside of the switch graph workflow. Currently, there are many useful graphing helper functions (e.g. switch_model.tools.graph.main.TransformTools.timestamp() will automatically convert a dataframe with a timestamp to a dataframe will all the time information include timeseries, period, hour of day, proper time zones, etc.). However these functions are only accessible when using the @graph decorator which is mainly built for functions within a switch module, not a custom graphing function you are writing locally.

Proposed Solution

There are many approaches to this problem but this is what I propose. Please share your thoughts!

  1. Change switch graph to switch analyze which would create the graphs that already exist and create comparison tables.

  2. Create an @table decorator that would indicate that a function should generate a table similarly to how the @graph decorator works. These tables should get generated when we run switch analyze and switch compare.

  3. Extend the existing graphing framework (now more generally an analysis framework) to allow it to work with custom code outside of SWITCH.

  4. Cleanup post_solve() to only output the essential information and calculate everything else in @table functions. Currently, post solve tries to do a lot at once since it is both used to save results from Gurobi but also to create a user friendly format that we can analyze.

I have more details in my head of how this could look like so feel free to reach out! This should give someone a starting idea of what I'm trying to get to.

@staadecker staadecker added dev-tools Related to tools and features used during development discussion enhancement labels Aug 5, 2021
@staadecker staadecker changed the title Improve post solve process Improve how we create tables Aug 5, 2021
@staadecker staadecker changed the title Improve how we create tables Improve how we analyze results Aug 10, 2021
@staadecker staadecker mentioned this issue Aug 10, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tools Related to tools and features used during development discussion enhancement Medium Priority
Projects
None yet
Development

No branches or pull requests

1 participant