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

Minor fixes in wind results processing #429

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Classify the change according to the following categories:
### Deprecated
### Removed

## Develop
### Fixed
- In `src/results/wind.jl`, fixed line incompatible with multinode and removed extraneous code

## v0.47.2
### Fixed
- Increased the big-M bound on maximum net metering benefit to prevent artificially low export benefits.
Expand Down
6 changes: 2 additions & 4 deletions src/results/wind.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ function add_wind_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="")
r["year_one_om_cost_before_tax"] = round(value(per_unit_size_om) / (p.pwf_om * p.third_party_factor), digits=0)

if !isempty(p.s.storage.types.elec)
WindToStorage = (sum(m[:dvProductionToStorage][b, t, ts] for b in p.s.storage.types.elec) for ts in p.time_steps)
PVtoBatt = (sum(m[Symbol("dvProductionToStorage"*_n)][b, t, ts] for b in p.s.storage.types.elec) for ts in p.time_steps)

WindToStorage = (sum(m[Symbol("dvProductionToStorage"*_n)][b, t, ts] for b in p.s.storage.types.elec) for ts in p.time_steps)
else
WindToStorage = zeros(length(p.time_steps))
end
r["electric_to_storage_series_kw"] = round.(value.(WindToStorage), digits=3)

r["annual_energy_exported_kwh"] = 0.0
if !isempty(p.s.electric_tariff.export_bins)
WindToGrid = (sum(m[:dvProductionToGrid][t, u, ts] for u in p.export_bins_by_tech[t]) for ts in p.time_steps)
WindToGrid = (sum(m[Symbol("dvProductionToGrid"*_n)][t, u, ts] for u in p.export_bins_by_tech[t]) for ts in p.time_steps)
r["electric_to_grid_series_kw"] = round.(value.(WindToGrid), digits=3)
r["annual_energy_exported_kwh"] = round(
sum(r["electric_to_grid_series_kw"]) * p.hours_per_time_step, digits=0)
Expand Down
Loading