Skip to content

Commit

Permalink
Merge pull request #80 from HauHe/hauke/no_rounding_new_cap
Browse files Browse the repository at this point in the history
Hauke/no rounding new cap
  • Loading branch information
HauHe authored Sep 22, 2023
2 parents b06bfb0 + ceb4a47 commit 1960fcf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ about allowing investment in coal.
Drop in an osemsosys file (called `osemosys.txt`) into the `model/` directory

## 2. Add the base data file
**NB:** Neither the model data nor the scenario data should make use of the parameter _TotalAnnualMaxCapacity_. It can cause problems when passing _NewCapacity_ from one step to the next step.

Drop in a MathProg formatted data file in the `data/` folder. The data file
can be long formatted (otoole) or wide formatted (momani)

Expand Down
9 changes: 0 additions & 9 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,6 @@ def main(input_data: str, step_length: int, path_param: str, cores: int, solver=

op_life = pd.read_csv(str(Path(step_dir_data, "OperationalLife.csv")))
new_cap = pd.read_csv(str(Path(step_dir_results, "NewCapacity.csv")))
new_cap["VALUE"] = new_cap["VALUE"] * 10
new_cap['VALUE'] = new_cap['VALUE'].apply(np.floor)
new_cap['VALUE'] = new_cap['VALUE'] / 10

res_cap = mu.update_res_capacity(
res_capacity=old_res_cap,
Expand Down Expand Up @@ -555,9 +552,6 @@ def main(input_data: str, step_length: int, path_param: str, cores: int, solver=
# Get updated residual capacity values
op_life = pd.read_csv(str(Path(option_dir_data, "OperationalLife.csv")))
new_cap = pd.read_csv(str(Path(option_dir_results, "NewCapacity.csv")))
new_cap["VALUE"] = new_cap["VALUE"] * 10
new_cap['VALUE'] = new_cap['VALUE'].apply(np.floor)
new_cap['VALUE'] = new_cap['VALUE'] / 10

# overwrite residual capacity values for all subsequent steps
next_step = step + 1
Expand Down Expand Up @@ -600,9 +594,6 @@ def main(input_data: str, step_length: int, path_param: str, cores: int, solver=

op_life = pd.read_csv(str(Path(option_dir_data, "OperationalLife.csv")))
new_cap = pd.read_csv(str(Path(option_dir_results, "NewCapacity.csv")))
new_cap["VALUE"] = new_cap["VALUE"] * 10
new_cap['VALUE'] = new_cap['VALUE'].apply(np.floor)
new_cap['VALUE'] = new_cap['VALUE'] / 10

# overwrite residual capacity values for all subsequent steps
next_step = step + 1
Expand Down

0 comments on commit 1960fcf

Please sign in to comment.