I have a cubic polynomial defined as below which needs to be linearised as a constraint for an MIP model in Gurobipy. I have seen a couple different methods including using the Gurobi general constraint for polynomial. However, using that method makes my model infeasible. I suspect that my understanding of attributes FuncPieces, FuncPieceError,FuncPiecesLength and FuncPieceRatio is insufficient to control the behavior of Gurobi's internal process of linearising the constraint. Thus, I am looking at alternatives of explicitly linearising it using Special Orderded Sets Type 2.
The expression is defined as below:
$$ N_{cyc,m} = -12198 \cdot SOC_m^3 + 71548 \cdot SOC_m^2 - 8985 \cdot SOC_m + 2620 $$
where $N_{cyc,m}$ and $SOC_m$ are the number of charging discharging cycles and state of charge of a battery for minute $m$.
Based on the number of cycles obtained, battery degradation $Deg_{cyc,m}$ at minute $m$ is then defined as :
$$ \begin{align*} Deg_{cyc,m} = 0.5 \cdot \left| \frac{1}{N_{cyc,m}} - \frac{1}{N_{cyc,m-1}}\right| \end{align*} $$
The formulation I have written up to use SOS type 2 is :
$$ SoC_{m}= \sum\limits_{k}\Delta_{m, k}SoC_{m, k} $$ $$ Deg_{cyc,m}= \sum\limits_{k} \Delta_{m, k} Deg_{cyc,m,k} $$ $$ \sum \limits_{k} \Delta_{m, k}=1 $$ $$ \sum\limits_{k} \delta_{m, k}=1 $$ $$ \Delta_{m, k}\leq \delta_{m, k}+ \delta_{m, k-1} $$ $$ SOC_m \epsilon (0,1) $$ $$ N_{cyc,m} \epsilon (0,52985) $$
I want to understand what is the fundamental behind choosing the right number of sets for such a polynomial and what might be the pitfalls of relative errors to the larger models. New to this method and would really appreaciate some help. Thank you.