Skip to content

Commit

Permalink
Fix #25 tested with CPLEX
Browse files Browse the repository at this point in the history
  • Loading branch information
grgmiller committed Aug 26, 2021
1 parent c370d01 commit 7c9139b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Binary file modified MODEL_RUNS/generic_office_example/model_inputs.xlsx
Binary file not shown.
Binary file modified MODEL_RUNS/model_inputs.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: switch_pyomo_update
name: switch_247
channels:
- nrel
- conda-forge
Expand Down
4 changes: 2 additions & 2 deletions switch_model/generate_input_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ def generate_inputs(model_workspace):

# ra_requirement.csv
xl_ra_req = pd.read_excel(io=model_inputs, sheet_name='RA_requirements').dropna(axis=1, how='all')
ra_requirement = xl_ra_req[xl_ra_req['RA_RESOURCE'] != 'flexible_RA']
ra_requirement = xl_ra_req.copy()[xl_ra_req['RA_RESOURCE'] != 'flexible_RA']
ra_requirement['period'] = year
ra_requirement = ra_requirement[['period','RA_RESOURCE','tp_month','ra_requirement','ra_cost','ra_resell_value']]

# flexible_ra_requirement.csv
flexible_ra_requirement = xl_ra_req[xl_ra_req['RA_RESOURCE'] == 'flexible_RA']
flexible_ra_requirement = xl_ra_req.copy()[xl_ra_req['RA_RESOURCE'] == 'flexible_RA']
flexible_ra_requirement['period'] = year
flexible_ra_requirement = flexible_ra_requirement.drop(columns=['RA_RESOURCE'])
flexible_ra_requirement = flexible_ra_requirement.rename(columns={'ra_requirement':'flexible_ra_requirement','ra_cost':'flexible_ra_cost', 'ra_resell_value':'flexible_ra_resell_value'})
Expand Down
6 changes: 3 additions & 3 deletions switch_model/run_scenarios.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"display_name": "Python 3.9.6 64-bit ('switch_pyomo_update': conda)"
},
"interpreter": {
"hash": "cb890774043425ecf88e59892042373e988ad484baa44c8e9a653dc1d20d3e17"
"hash": "ff6a17ac238744b540d27fccff62995fc5aaf3aa453e839e2267df7f5be6aa37"
}
},
"nbformat": 4,
Expand Down Expand Up @@ -65,7 +65,7 @@
"model_runs_folder = '../MODEL_RUNS'\r\n",
"\r\n",
"# enter the name of the folder within your MODEL_RUNS folder where the input and output files for this specific model run are located\r\n",
"model_run_name = 'generic_office_example'\r\n",
"model_run_name = 'test_PCE'\r\n",
"\r\n",
"model_workspace = Path.cwd() / f'{model_runs_folder}/{model_run_name}'"
],
Expand Down Expand Up @@ -168,7 +168,7 @@
"cell_type": "code",
"execution_count": null,
"source": [
"os.system(f'start cmd /k \"cd {model_runs_folder}\\{model_run_name} & activate switch_pyomo_update & switch solve-scenarios\"') "
"os.system(f'start cmd /k \"cd {model_runs_folder}\\{model_run_name} & activate switch_247 & switch solve-scenarios\"') "
],
"outputs": [],
"metadata": {}
Expand Down

0 comments on commit 7c9139b

Please sign in to comment.