# MINLP written by GAMS Convert at 02/17/22 17:19:34
#
# Equation counts
#     Total        E        G        L        N        X        C        B
#        65       10       10       45        0        0        0        0
#
# Variable counts
#                  x        b        i      s1s      s2s       sc       si
#     Total     cont   binary  integer     sos1     sos2    scont     sint
#        62       22       40        0        0        0        0        0
# FX      0
#
# Nonzero counts
#     Total    const       NL
#       240      235        5
#
# 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=(0,29), initialize=0)
m.x8 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x9 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x10 = Var(within=Reals, bounds=(0,29), initialize=0)
m.x11 = Var(within=Reals, bounds=(1,40), initialize=1)
m.x12 = Var(within=Reals, bounds=(1,50), initialize=1)
m.x13 = Var(within=Reals, bounds=(1,60), initialize=1)
m.x14 = Var(within=Reals, bounds=(1,35), initialize=1)
m.x15 = Var(within=Reals, bounds=(1,75), initialize=1)
m.x16 = Var(within=Reals, bounds=(1,40), initialize=1)
m.x17 = Var(within=Reals, bounds=(1,50), initialize=1)
m.x18 = Var(within=Reals, bounds=(1,60), initialize=1)
m.x19 = Var(within=Reals, bounds=(1,35), initialize=1)
m.x20 = Var(within=Reals, bounds=(1,75), initialize=1)
m.x21 = Var(within=Reals, bounds=(0,30), initialize=0)
m.x22 = Var(within=Reals, bounds=(0,30), 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.b27 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b28 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b29 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b30 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b31 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b32 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b33 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b34 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b35 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b36 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b37 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b38 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b39 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b40 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b41 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b42 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b43 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b44 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b45 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b46 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b47 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b48 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b49 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b50 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b51 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b52 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b53 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b54 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b55 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b56 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b57 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b58 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b59 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b60 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b61 = Var(within=Binary, bounds=(0,1), initialize=0)
m.b62 = Var(within=Binary, bounds=(0,1), initialize=0)

m.obj = Objective(sense=minimize, expr= 2 * m.x21 + 2 * m.x22)

m.e1 = Constraint(expr= -m.x1 - m.x11 + m.x21 >= 0)
m.e2 = Constraint(expr= -m.x2 - m.x12 + m.x21 >= 0)
m.e3 = Constraint(expr= -m.x3 - m.x13 + m.x21 >= 0)
m.e4 = Constraint(expr= -m.x4 - m.x14 + m.x21 >= 0)
m.e5 = Constraint(expr= -m.x5 - m.x15 + m.x21 >= 0)
m.e6 = Constraint(expr= -m.x6 - m.x16 + m.x22 >= 0)
m.e7 = Constraint(expr= -m.x7 - m.x17 + m.x22 >= 0)
m.e8 = Constraint(expr= -m.x8 - m.x18 + m.x22 >= 0)
m.e9 = Constraint(expr= -m.x9 - m.x19 + m.x22 >= 0)
m.e10 = Constraint(expr= -m.x10 - m.x20 + m.x22 >= 0)
m.e11 = Constraint(expr= 40 / m.x16 - m.x11 <= 0)
m.e12 = Constraint(expr= 50 / m.x17 - m.x12 <= 0)
m.e13 = Constraint(expr= 60 / m.x18 - m.x13 <= 0)
m.e14 = Constraint(expr= 35 / m.x19 - m.x14 <= 0)
m.e15 = Constraint(expr= 75 / m.x20 - m.x15 <= 0)
m.e16 = Constraint(expr= m.x1 - m.x2 + m.x11 + 69 * m.b23 <= 69)
m.e17 = Constraint(expr= m.x1 - m.x3 + m.x11 + 69 * m.b24 <= 69)
m.e18 = Constraint(expr= m.x1 - m.x4 + m.x11 + 69 * m.b25 <= 69)
m.e19 = Constraint(expr= m.x1 - m.x5 + m.x11 + 69 * m.b26 <= 69)
m.e20 = Constraint(expr= m.x2 - m.x3 + m.x12 + 79 * m.b27 <= 79)
m.e21 = Constraint(expr= m.x2 - m.x4 + m.x12 + 79 * m.b28 <= 79)
m.e22 = Constraint(expr= m.x2 - m.x5 + m.x12 + 79 * m.b29 <= 79)
m.e23 = Constraint(expr= m.x3 - m.x4 + m.x13 + 89 * m.b30 <= 89)
m.e24 = Constraint(expr= m.x3 - m.x5 + m.x13 + 89 * m.b31 <= 89)
m.e25 = Constraint(expr= m.x4 - m.x5 + m.x14 + 64 * m.b32 <= 64)
m.e26 = Constraint(expr= -m.x1 + m.x2 + m.x12 + 79 * m.b33 <= 79)
m.e27 = Constraint(expr= -m.x1 + m.x3 + m.x13 + 89 * m.b34 <= 89)
m.e28 = Constraint(expr= -m.x1 + m.x4 + m.x14 + 64 * m.b35 <= 64)
m.e29 = Constraint(expr= -m.x1 + m.x5 + m.x15 + 104 * m.b36 <= 104)
m.e30 = Constraint(expr= -m.x2 + m.x3 + m.x13 + 89 * m.b37 <= 89)
m.e31 = Constraint(expr= -m.x2 + m.x4 + m.x14 + 64 * m.b38 <= 64)
m.e32 = Constraint(expr= -m.x2 + m.x5 + m.x15 + 104 * m.b39 <= 104)
m.e33 = Constraint(expr= -m.x3 + m.x4 + m.x14 + 64 * m.b40 <= 64)
m.e34 = Constraint(expr= -m.x3 + m.x5 + m.x15 + 104 * m.b41 <= 104)
m.e35 = Constraint(expr= -m.x4 + m.x5 + m.x15 + 104 * m.b42 <= 104)
m.e36 = Constraint(expr= m.x6 - m.x7 + m.x16 + 69 * m.b43 <= 69)
m.e37 = Constraint(expr= m.x6 - m.x8 + m.x16 + 69 * m.b44 <= 69)
m.e38 = Constraint(expr= m.x6 - m.x9 + m.x16 + 69 * m.b45 <= 69)
m.e39 = Constraint(expr= m.x6 - m.x10 + m.x16 + 69 * m.b46 <= 69)
m.e40 = Constraint(expr= m.x7 - m.x8 + m.x17 + 79 * m.b47 <= 79)
m.e41 = Constraint(expr= m.x7 - m.x9 + m.x17 + 79 * m.b48 <= 79)
m.e42 = Constraint(expr= m.x7 - m.x10 + m.x17 + 79 * m.b49 <= 79)
m.e43 = Constraint(expr= m.x8 - m.x9 + m.x18 + 89 * m.b50 <= 89)
m.e44 = Constraint(expr= m.x8 - m.x10 + m.x18 + 89 * m.b51 <= 89)
m.e45 = Constraint(expr= m.x9 - m.x10 + m.x19 + 64 * m.b52 <= 64)
m.e46 = Constraint(expr= -m.x6 + m.x7 + m.x17 + 79 * m.b53 <= 79)
m.e47 = Constraint(expr= -m.x6 + m.x8 + m.x18 + 89 * m.b54 <= 89)
m.e48 = Constraint(expr= -m.x6 + m.x9 + m.x19 + 64 * m.b55 <= 64)
m.e49 = Constraint(expr= -m.x6 + m.x10 + m.x20 + 104 * m.b56 <= 104)
m.e50 = Constraint(expr= -m.x7 + m.x8 + m.x18 + 89 * m.b57 <= 89)
m.e51 = Constraint(expr= -m.x7 + m.x9 + m.x19 + 64 * m.b58 <= 64)
m.e52 = Constraint(expr= -m.x7 + m.x10 + m.x20 + 104 * m.b59 <= 104)
m.e53 = Constraint(expr= -m.x8 + m.x9 + m.x19 + 64 * m.b60 <= 64)
m.e54 = Constraint(expr= -m.x8 + m.x10 + m.x20 + 104 * m.b61 <= 104)
m.e55 = Constraint(expr= -m.x9 + m.x10 + m.x20 + 104 * m.b62 <= 104)
m.e56 = Constraint(expr= m.b23 + m.b33 + m.b43 + m.b53 == 1)
m.e57 = Constraint(expr= m.b24 + m.b34 + m.b44 + m.b54 == 1)
m.e58 = Constraint(expr= m.b25 + m.b35 + m.b45 + m.b55 == 1)
m.e59 = Constraint(expr= m.b26 + m.b36 + m.b46 + m.b56 == 1)
m.e60 = Constraint(expr= m.b27 + m.b37 + m.b47 + m.b57 == 1)
m.e61 = Constraint(expr= m.b28 + m.b38 + m.b48 + m.b58 == 1)
m.e62 = Constraint(expr= m.b29 + m.b39 + m.b49 + m.b59 == 1)
m.e63 = Constraint(expr= m.b30 + m.b40 + m.b50 + m.b60 == 1)
m.e64 = Constraint(expr= m.b31 + m.b41 + m.b51 + m.b61 == 1)
m.e65 = Constraint(expr= m.b32 + m.b42 + m.b52 + m.b62 == 1)
