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

from pyomo.environ import *

model = m = ConcreteModel()

m.x1 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x2 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x3 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x4 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x5 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x6 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x7 = Var(within=Reals, bounds=(1,40), initialize=1)
m.x8 = Var(within=Reals, bounds=(1,50), initialize=1)
m.x9 = Var(within=Reals, bounds=(1,60), initialize=1)
m.x10 = Var(within=Reals, bounds=(1,40), initialize=1)
m.x11 = Var(within=Reals, bounds=(1,50), initialize=1)
m.x12 = Var(within=Reals, bounds=(1,60), initialize=1)
m.x13 = Var(within=Reals, bounds=(0,30), initialize=0)
m.x14 = Var(within=Reals, bounds=(0,30), initialize=0)
m.b15 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b16 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b17 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b18 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b19 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b20 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b21 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b22 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b23 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b24 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b25 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b26 = Var(within=Binary, bounds=(0,1), initialize=0)

m.obj = Objective(sense=minimize, expr= 2 * m.x13 + 2 * m.x14)

m.e1 = Constraint(expr= -m.x1 - m.x7 + m.x13 >= 0)
m.e2 = Constraint(expr= -m.x2 - m.x8 + m.x13 >= 0)
m.e3 = Constraint(expr= -m.x3 - m.x9 + m.x13 >= 0)
m.e4 = Constraint(expr= -m.x4 - m.x10 + m.x14 >= 0)
m.e5 = Constraint(expr= -m.x5 - m.x11 + m.x14 >= 0)
m.e6 = Constraint(expr= -m.x6 - m.x12 + m.x14 >= 0)
m.e7 = Constraint(expr= 40 / m.x10 - m.x7 <= 0)
m.e8 = Constraint(expr= 50 / m.x11 - m.x8 <= 0)
m.e9 = Constraint(expr= 60 / m.x12 - m.x9 <= 0)
m.e10 = Constraint(expr= m.x1 - m.x2 + m.x7 + 69 * m.b15 <= 69)
m.e11 = Constraint(expr= m.x1 - m.x3 + m.x7 + 69 * m.b16 <= 69)
m.e12 = Constraint(expr= m.x2 - m.x3 + m.x8 + 79 * m.b17 <= 79)
m.e13 = Constraint(expr= -m.x1 + m.x2 + m.x8 + 79 * m.b18 <= 79)
m.e14 = Constraint(expr= -m.x1 + m.x3 + m.x9 + 89 * m.b19 <= 89)
m.e15 = Constraint(expr= -m.x2 + m.x3 + m.x9 + 89 * m.b20 <= 89)
m.e16 = Constraint(expr= m.x4 - m.x5 + m.x10 + 69 * m.b21 <= 69)
m.e17 = Constraint(expr= m.x4 - m.x6 + m.x10 + 69 * m.b22 <= 69)
m.e18 = Constraint(expr= m.x5 - m.x6 + m.x11 + 79 * m.b23 <= 79)
m.e19 = Constraint(expr= -m.x4 + m.x5 + m.x11 + 79 * m.b24 <= 79)
m.e20 = Constraint(expr= -m.x4 + m.x6 + m.x12 + 89 * m.b25 <= 89)
m.e21 = Constraint(expr= -m.x5 + m.x6 + m.x12 + 89 * m.b26 <= 89)
m.e22 = Constraint(expr= m.b15 + m.b18 + m.b21 + m.b24 == 1)
m.e23 = Constraint(expr= m.b16 + m.b19 + m.b22 + m.b25 == 1)
m.e24 = Constraint(expr= m.b17 + m.b20 + m.b23 + m.b26 == 1)
