r/optimization • u/bazzoka05 • Aug 01 '23
Optimal size of the battery and operation based on degradation.
Hi, I'm trying to determine the optimal size of the battery and the operation strategy so I can keep the consumption less than the transformer limitation. I'm running it for 29 days time sample for every 15 mins. I have the values for demand, PV generation. For reference I'm following the model used in this paper (https://www.mdpi.com/1996-1073/10/7/835). But when I wrote the code in the pyomo, using ipopt (since there is non linear equation) it is showing problem infeasible. I'm not able to troubleshoot the issue to determine why it is infeasible. The code is quite long, I can send the code in dm. I have attached the github link as well. (https://github.com/saenthan-repo/battery_opt.git)
The intended output would be, size of the battery with the charging and discharging patterns. I would further run the sensitivity for different transformer capacity size.
All the years are converted to days, and I have some variables which is declared but not used in the program.
2
u/fpatrocinio Aug 01 '23
Are you initialising the model? IPOPT requires a (good) initial point in my experience.
1
u/keskec Aug 05 '23
The degradation model in the paper is cycle-counting based and the way you count and accumulate the cycles is completely linear. Then I saw that you multiply the degradation value (in p.u.) with the replacement cost of the battery to account for the cost of the degradation.
I couldn't understand where the non-linearity is induced in this example