Skip to content

Commit

Permalink
Preliminary integration with an additional power flow model
Browse files Browse the repository at this point in the history
  • Loading branch information
toddleif committed Oct 21, 2024
1 parent 290cd02 commit aa47b0d
Show file tree
Hide file tree
Showing 4 changed files with 278 additions and 105 deletions.
1 change: 1 addition & 0 deletions src/REopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import Plots
function __init__()
@require GhpGhx="7ce85f02-24a8-4d69-a3f0-14b5daa7d30c" println("using GhpGhx module in REopt")
@require PlotlyJS="f0f68f2c-4968-5e81-91da-67840de0976a" println("Using the PlotlyJS package")
@require PowerModelsDistribution="d7431456-977f-11e9-2de3-97ff7677985e" println("Using PowerModelsDistribution package")
end

const EXISTING_BOILER_EFFICIENCY = 0.8
Expand Down
6 changes: 5 additions & 1 deletion src/constraints/electric_utility_constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ function add_export_constraints(m, p; _n="")

##Constraint (8e): Production export and curtailment no greater than production
if string(p.s.site.node) != p.s.settings.facilitymeter_node
print("\n Adding constraint 8e to node $(p.s.site.node)")
print("\n Updated***Test 4, Adding constraint 8e to node $(p.s.site.node)")
@constraint(m, [t in p.techs.elec, ts in p.time_steps_with_grid],
p.production_factor[t,ts] * p.levelization_factor[t] * m[Symbol("dvRatedProduction"*_n)][t,ts]
>= sum(m[Symbol("dvProductionToGrid"*_n)][t, u, ts] for u in p.export_bins_by_tech[t]) +
m[Symbol("dvCurtail"*_n)][t, ts]
)
else
print("\n Not adding constraint 8e to the facility meter node, node $(p.s.site.node)")
TempVector = collect(201:8760) # implemented only for initial testing; TODO: remove this after testing
@constraint(m, [t in p.techs.elec, ts in p.time_steps_with_grid], m[Symbol("dvRatedProduction"*_n)][t,ts] == 0)
@constraint(m, [t in p.techs.elec, ts in TempVector], sum(m[Symbol("dvProductionToGrid"*_n)][t, u, ts] for u in p.export_bins_by_tech[t]) == 0)
@constraint(m, [t in p.techs.elec, ts in p.time_steps_with_grid], m[Symbol("dvCurtail"*_n)][t, ts] == 0)
end

binNEM = 0
Expand Down
Loading

0 comments on commit aa47b0d

Please sign in to comment.