Hi all!
I am experiencing some numericals problems in my model. I am using the academic license of GUROBI through MATLAB. I have a linear objective function with a second order cone constraint (SOCP). The problem is that the solver gets stuck iterating with no end. The objective primal and dual remain approximately constant, whereas the residuals and the complementary change continuosly. Even though I changed the scale of the model the problem persists.
Some of the constraints are similar to a MPC:
P1(t1)*time_step + kslack(t1) >=Wmin(t1)
P1(t1)*time_step +
P1(t2)*time_step + kslack(t1) + kslack(t2) >=Wmin(t2)
P1(t1)*time_step +
P1(t2)*time_step + kslack(t1) + kslack(t2) + … + P1(tn)*time_step + kslack(tn) >=Wmin(tn)
P1(t1)*time_step + kslack(t1) <=Wmax(t1)
P1(t1)*time_step +
P1(t2)*time_step + kslack(t1) + kslack(t2) <=Wmax(t2)
P1(t1)*time_step +
P1(t2)*time_step + kslack(t1) + kslack(t2) + … + P1(tn)*time_step + kslack(tn) <=Wmax(tn)
The SOC of the battery should be always between a lower and upper limit (Wmin and Wmax are cummulative values during a whole time horizon). In case it is not possible (due to technical constraints), it will be penalized in the objective function.
Then I penalize in the objective function as:
OF = C_loss * Losses + C_ns * sum( kslack)
I attach some screenshoots of the solver performance, the coefficient statistics and an example of Wmin and Wmax curves as well.
Does anyone know why the algorithm does not converge? If I do not consider the penalization, the algorithm converges without problems. However if I do not include the penalization and if the demand cannot be technically met, the problem would be infeasible...
Thanks in advance for your time and help :) !! Any comment is welcome!