Conversion into MINLP

39 Views Asked by At

I want to solve the following optimization problem.

\begin{aligned} \text{Objective:} \hspace{1cm} & \text{maximize} \hspace{0.2cm} \sum_{s=1}^{N}{\frac{1}{N}}\left[\sum_{t=1}^{T}\left(\frac{1}{1+r}\right)^t (R_{t,s}(x_{s},\epsilon_{t,s})-C_{t,s}(x_{s},\epsilon_{t,s}))\right]\\ \text{where} \hspace{1cm}& R_{t,s}(x_{s},\epsilon_{t,s})=a_{1}\min(D_{t,s},x_{s})+a_{2}\min(D_{t,s},x_{s})*(a_{3}-a_{4}\epsilon_{t,s}) \\\text{ } \hspace{1cm}& C_{t,s}(x_{s},\epsilon_{t,s})=a_{5}+a_{6}x_{s}+a_{7}\min(D_{t,s},x_{s})+a_{8}\min(D_{t,s},x_{s}) \\ \text{Constraints:} \hspace{1cm} & 0\leq x_{s}\leq x_{max} \end{aligned} $N,T, r,a_{1},\dots,a_{8}$, $x_{max}$ are all fixed constants.$\\$

Variables: $x_{s}$ (Total $N$ variables)

Parameters: $D_{t,s}$, $\epsilon_{t,s}$

I want to solve this problem using python (solver is not determined yet).

But as far as I know, it is difficult to embody objective function which contains minimization in python. So I introduced binary variables($z_{t,s}^1$, $z_{t,s}^2$) to remove min function such that the original problem was converted into MINLP.

\begin{aligned} \text{Objective:} \hspace{1cm} & \text{maximize} \hspace{0.2cm} \sum_{s=1}^{N}{\frac{1}{N}}\left[\sum_{t=1}^{T}\left(\frac{1}{1+r}\right)^t (R_{t,s}(x_{s},\epsilon_{t,s})-C_{t,s}(x_{s},\epsilon_{t,s}))\right]\\ \text{where} \hspace{1cm}& R_{t,s}(x_{s},\epsilon_{t,s})=z_{t,s}^1[a_{1}D_{t,s}+a_{2}D_{t,s}(a_{3}-a_{4}\epsilon_{t,s})]+z_{t,s}^2[a_{1}x_{s}+a_{2}x_{s}(a_{3}-a_{4}\epsilon_{t,s})] \\\text{ } \hspace{1cm}& C_{t,s}(x_{s},\epsilon_{t,s})=a_{5}+a_{6}x_{s}+z_{t,s}^1(a_{7}+a_{8}D_{t,s})+z_{t,s}^2(a_{7}+a_{8}x_{s}) \\ \text{Constraints:} \hspace{1cm} & 0\leq x_{s}\leq x_{max}\\ \hspace{1cm} & z_{t,s}^1 + z_{t,s}^2=1 \quad (z_{t,s}^1, z_{t,s}^2 \textrm{ are binary})\\ \hspace{1cm} & x_{s} - D_{t,s}\leq 1000000z_{t,s}^1\\ \hspace{1cm} & D_{t,s} - x_{s}\leq 1000000z_{t,s}^2\\ \end{aligned} $N,T,r,a_{1},\dots, a_{8}, x_{max}$ are all fixed constants.$\\$

Variables: $x_{s}$, $z_{t,s}^1$, $z_{t,s}^2$ (Total $N(1+2T)$ variables)

Parameters: $D_{t,s}$, $\epsilon_{t,s}$

I'm wondering if this conversion makes me solve the problem in python easier or not.

Can I solve this problem in python? If can, which solver do I have to use?