Relative Content

Tag Archive for pythonmathematical-optimizationcvxpyconvex-optimization

How to Implement Conditional Statements within an Objective Function in CVXPY

I want to clarify that this is a follow-up question to one where we resolved an issue I was having with the max atomic function in CVXPY (Convex Function in CVXPy does not appear to be producing the optimal solution for a battery in an electircal system). With that solved, I am now encountering problems with the sum atomic function in CVXPY.

Convex Function in CVXPy does not appear to be producing the optimal solution for a battery in an electircal system

I am working on optimizing a battery system(1 MWh) that, in conjunction with solar power(200 kW nameplate capacity), aims to reduce electricity costs for a commercial building. For those unfamiliar with commercial electricity pricing, here’s a brief overview: charges typically include energy charges (based on total energy consumption over a month) and demand charges (based on the peak energy usage within a 15-minute interval, referred to as peak demand). These rates vary throughout the day based on Time of Use (TOU).