l'm having trouble coding an optimization problem in pyomo.
I have a load profile , battery system , PV , and wind system.
My objective is to minimize the cost of the system.
P1- Wind power to load P2- PV power to load P3-Wind power to battery P4-PV power to battery P5-Battery power to load SOC -state of charge
Objective minimize costs (P3+P4+P5)(capital cost + operating expenses)
Constrains p1(t)+p2(t)+p(5)=PL(t) The power demanded by the load is always delivered p1(t)+ p3(t)=<PW(t) The power supplied to the load by the wind cannot exceed its capacity p2(t)+ p4(t)=<PW(t) The power supplied to the load by the PV cannot exceed its capacity
SOC min =<SOC(t)=<SOC max The state of charge of a battery cannot exceed its limits
SOC(t)=S0C(t-1)+P3(t)+P4(t)-p5(t)
The state of charge at time is given by the above.
How can l optimize this problem in PYOMO.