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

Add remianing rules for snakemake #80

Open
trevorb1 opened this issue Dec 18, 2021 · 1 comment
Open

Add remianing rules for snakemake #80

trevorb1 opened this issue Dec 18, 2021 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@trevorb1
Copy link
Member

The snakemake workflow ends at at creating the lp file. We need to add in rules for actually solving the model. There will probably be two branches for this, one using CBC (so there is a workflow in place for full open-source) and one for CPLEX (as its way faster!). The general steps are shown below for both. Double check exact commands, these are off the top of my head!

  1. Solve via CBC
  • CBC solve command
  • use otoole to convert cbc results to folder of csvs (otoole results –input_datapackage datapackage.json –input_datafile <datafile.txt> cbc csv <cbcResults.sol> <resultsFolder>)
  1. Solve via CPLEX
  • CPLEX solve command to get a *.sol file (might be worth writing out solution quality at this point as well)
  • Run the transformation script on the *.sol file as described in "Using OSeMOSYS with CPLEX Solver" section here
  • Run the sort command (sort original.sol > sorted.sol)
  • Run the convert cplex to cbc results script found on the Osemosys GitHub here . Make sure to input the correct start and end year when executing the script
  • use otoole to create a folder of csvs (otoole results –input_datapackage datapackage.json –input_datafile <datafile.txt> cbc csv <cbcResults.sol> <resultsFolder>)
@trevorb1 trevorb1 added bug Something isn't working enhancement New feature or request labels Dec 18, 2021
@trevorb1
Copy link
Member Author

I think there were issues with getting the folder of CSVs at the end using CPLEX, so some trial and error will probably be needed to sort that out. Right now, we only use Rate of Activity and New Capacity (as thats all we could get to print out) then manually calculate the other variables we need in the result jupyter notebooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants