[Feature] Storage Components Need Separate Cashflows For Charge/Discharge/SOC
Motivation
The current implementation of storage components in optimization models only supports a single cash flow that is applied to the State of Charge (SOC) variable. This limitation creates problems when trying to model more realistic economic behavior of storage systems. In reality, there might be different costs for charging vs discharging operations, holding costs based on SOC, and degradation costs that vary based on operation type. To address these issues, storage components need to support separate cash flows for charge, discharge, and SOC.
Current Behavior
Currently, storage components only allow associating cash flows with the SOC variable. These cash flows are processed differently from non-storage components in the objective function. To work around this limitation, users need to remove cash flows from storage entirely. This approach is not only cumbersome but also leads to inaccurate modeling of storage economics.
Desired Behavior
Storage components should support three distinct types of cash flows:
- SOC Cashflows: Applied to energy stored (capacity payments, opportunity costs)
- Charge Cashflows: Applied to charging operations (electricity purchase costs, wear-and-tear)
- Discharge Cashflows: Applied to discharging operations (electricity sales revenue)
By supporting these separate cash flows, storage components can accurately model the economic behavior of storage systems, including the costs and revenues associated with charging and discharging operations.
Design
To achieve the desired behavior, the Storage
class needs to be extended to accept three separate cash flow lists:
soc_cashflows
: Applied to SOCcharge_cashflows
: Applied to charging operationsdischarge_cashflows
: Applied to discharging operations
The objective function also needs to be updated to consider all three cash flow types. This can be achieved by iterating over the cash flow lists for each storage component and calculating the total cost or revenue for each cash flow type.
Impact
The proposed design change will have a significant impact on the accuracy and realism of storage economics modeling. By supporting separate cash flows for charge, discharge, and SOC, storage components can:
- More accurately model the economic behavior of storage systems
- Better represent market participation for batteries
- Model arbitrage and ancillary services more accurately
- Provide a more intuitive model specification for users
Example Usage
Here's an example of how to use the proposed design:
battery = Storage(
name="battery",
resource=electricity,
max_capacity=50,
rte=0.9,
max_charge_rate=0.3,
max_discharge_rate=0.3,
initial_stored=0.2,
soc_cashflows=[Cost(name="battery_capacity_cost", alpha=0.5)], # $/MWh-stored
charge_cashflows=[Cost(name="battery_charging_cost", alpha=45)], # $/MWh-charged
discharge_cashflows=[Revenue(name="battery_discharge_rev", alpha=50)], # $/MWh-discharged
)
In this example, the battery
storage component has three separate cash flow lists: soc_cashflows
, charge_cashflows
, and discharge_cashflows
. Each cash flow list contains a single cash flow object, which represents the cost revenue associated with the corresponding operation.
Benefits
The proposed design change will bring several benefits to storage economics modeling:
- More realistic modeling: The proposed design will allow for more accurate modeling of storage economics, including the costs and revenues associated with charging and discharging operations.
- Better representation of market participation: The proposed design will enable better representation of market participation for batteries, including the costs and revenues associated with arbitrage and ancillary services.
- More intuitive model specification: The proposed design will provide a more intuitive model specification for users, making it easier to create accurate and realistic models of storage economics.
Frequently Asked Questions
We've received several questions about the proposed design change to support separate cash flows for charge, discharge, and SOC in storage components. Here are some of the most frequently asked questions and their answers:
Q: Why do we need separate cash flows for charge, discharge, and SOC?
A: Currently, storage components only support a single cash flow that is applied to the SOC variable. This limitation creates problems when trying to model more realistic economic behavior of storage systems. By supporting separate cash flows for charge, discharge, and SOC, we can accurately model the costs and revenues associated with each operation.
Q: How will this design change affect the objective function?
A: The objective function will need to be updated to consider all three cash flow types. This can be achieved by iterating over the cash flow lists for each storage component and calculating the total cost or revenue for each cash flow type.
Q: Will this design change affect the existing code?
A: Yes, the existing code will need to be updated to accommodate the new design. This will involve modifying the Storage
class to accept three separate cash flow lists and updating the objective function to consider all three cash flow types.
Q: How will this design change affect the user experience?
A: The proposed design change will provide a more intuitive model specification for users. By supporting separate cash flows for charge, discharge, and SOC, users will be able to more accurately model the economic behavior of storage systems and better represent market participation for batteries.
Q: What are the benefits of this design change?
A: The proposed design change will bring several benefits to storage economics modeling, including:
- More realistic modeling of storage economics
- Better representation of market participation for batteries
- More intuitive model specification for users
Q: How will this design change affect the accuracy of storage economics modeling?
A: The proposed design change will significantly improve the accuracy of storage economics modeling. By supporting separate cash flows for charge, discharge, and SOC, we can more accurately model the costs and revenues associated with each operation.
Q: What is the timeline for implementing this design change?
A: We anticipate that the design change will be implemented in the next major release of the software. We will provide more information on the timeline and implementation details as they become available.
Q: How can I provide feedback on this design change?
A: We welcome feedback on the proposed design change. You can provide feedback by submitting a comment on this article or by contacting us directly.
Additional Resources
If you have any additional questions or would like more information on the proposed design change, please refer to the following resources:
- Storage Components Need Separate Cashflows for Charge/Discharge/SOC
- Design
- Impact
- Example Usage
- Benefits
We hope this Q&A article has provided you with a better understanding of the proposed design change to support separate cash flows for charge, discharge, and SOC in storage components. If you have any further or would like more information, please don't hesitate to contact us.