# MINLP written by GAMS Convert at 02/17/22 17:22:55
#
# Equation counts
#     Total        E        G        L        N        X        C        B
#         4        0        1        3        0        0        0        0
#
# Variable counts
#                  x        b        i      s1s      s2s       sc       si
#     Total     cont   binary  integer     sos1     sos2    scont     sint
#         6        3        0        3        0        0        0        0
# FX      0
#
# Nonzero counts
#     Total    const       NL
#         9        9        0
#
# Reformulation has removed 1 variable and 1 equation

from pyomo.environ import *

model = m = ConcreteModel()

m.i1 = Var(within=Integers, bounds=(0,1), initialize=0)
m.i2 = Var(within=Integers, bounds=(0,1), initialize=0)
m.i3 = Var(within=Integers, bounds=(0,1), initialize=0)
m.x4 = Var(within=Reals, bounds=(0,1e+15), initialize=0)
m.x5 = Var(within=Reals, bounds=(0,1e+15), initialize=0)
m.x6 = Var(within=Reals, bounds=(0,1e+15), initialize=0)

m.obj = Objective(sense=minimize, expr= 5 * m.x4 * m.x4 + 2 * m.x4 + 5 * m.x5
    * m.x5 + 3 * m.x5 + 10 * m.x6 * m.x6 - 500 * m.x6 + 10 * m.i1 - 4 * m.i2
    + 5 * m.i3)

m.e1 = Constraint(expr= m.x4 + m.x5 - m.x6 >= 0)
m.e2 = Constraint(expr= -5 * m.i1 + m.x4 <= 0)
m.e3 = Constraint(expr= -10 * m.i2 + m.x5 <= 0)
m.e4 = Constraint(expr= -30 * m.i3 + m.x6 <= 0)
