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

Modelling hydro reservoirs with LDS #572

Closed
filippopecci opened this issue Nov 8, 2023 · 0 comments · Fixed by #598
Closed

Modelling hydro reservoirs with LDS #572

filippopecci opened this issue Nov 8, 2023 · 0 comments · Fixed by #598
Assignees
Labels
bug Something isn't working

Comments

@filippopecci
Copy link
Collaborator

filippopecci commented Nov 8, 2023

There is probably a bug in modelling of inter-period linkage for hydro resources. In hydro_res.jl, the constraint cHydroReservoir models the state of charge for all hydro resources and all time steps. This includes the start time steps of each representative periods. As a result, start and end of each period are linked:

	cHydroReservoir[y in HYDRO_RES, t in 1:T], EP[:vS_HYDRO][y,t] == (EP[:vS_HYDRO][y, hoursbefore(p,t,1)]
				- (1/dfGen[y,:Eff_Down]*EP[:vP][y,t]) - vSPILL[y,t] + inputs["pP_Max"][y,t]*EP[:eTotalCap][y])

However, when a hydro resource has LDS=1, the link between the state of charge at the start and the end of each period is modelled in hydro_inter_period_linkage.jl by constraint cSoCBalLongDurationStorageStart_H, which should be the only one to hold for start time steps for hydro resources with LDS.

This is why, for normal storage resources, we have these constraint definitions in storage_all.jl:

if representative_periods > 1 && !isempty(inputs["STOR_LONG_DURATION"])
		CONSTRAINTSET = STOR_SHORT_DURATION
	else
		CONSTRAINTSET = STOR_ALL
	end
	@constraint(EP, cSoCBalStart[t in START_SUBPERIODS, y in CONSTRAINTSET], EP[:vS][y,t] ==
		EP[:vS][y,t+hours_per_subperiod-1] - (1/dfGen[y,:Eff_Down] * EP[:vP][y,t])
		+ (dfGen[y,:Eff_Up]*EP[:vCHARGE][y,t]) - (dfGen[y,:Self_Disch] * EP[:vS][y,t+hours_per_subperiod-1]))

and

cSoCBalInterior[t in INTERIOR_SUBPERIODS, y in STOR_ALL], EP[:vS][y,t] ==
			EP[:vS][y,t-1]-(1/dfGen[y,:Eff_Down]*EP[:vP][y,t])+(dfGen[y,:Eff_Up]*EP[:vCHARGE][y,t])-(dfGen[y,:Self_Disch]*EP[:vS][y,t-1])

We should modify constraint cHydroReservoir to match the formulation used in storage_all.jl.

@filippopecci filippopecci added the bug Something isn't working label Nov 8, 2023
filippopecci added a commit that referenced this issue Dec 7, 2023
filippopecci added a commit that referenced this issue Dec 7, 2023
@filippopecci filippopecci reopened this Jan 8, 2024
@filippopecci filippopecci linked a pull request Jan 8, 2024 that will close this issue
lbonaldo added a commit that referenced this issue Feb 1, 2024
Fixed #572 : allow long duration hydro reservoirs 
to operate as long duration storage resources
filippopecci added a commit that referenced this issue Feb 14, 2024
filippopecci added a commit that referenced this issue Feb 14, 2024
filippopecci added a commit that referenced this issue Feb 14, 2024
Fixed issue #572 by allowing hydro reservoirs to operate as long duration storage resources
filippopecci added a commit that referenced this issue Feb 14, 2024
* Fixed issue #572 by allowing hydro reservoirs to operate as long duration storage resources

* added HYDRO_SHORT_DURATION flag to inputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants