Module coinor.grumpy.examples.LP1

Expand source code
numVars = 2
'''
A = [[-2, -3], 
     [-4, -2], 
     [-3, -4],
     ]

b = [-5, 
     -15, 
     -20,
      ]

x_u = [9,
       6,
       ]

'''

# For display, adding bounds explicitly is better
A = [[-2, -3], 
     [-4, -2], 
     [-3, -4], 
     [1, 0], 
     [0, 1], 
     [-1, 0], 
     [0, -1]]

b = [-5, 
     -15, 
     -20, 
     9, 
     6, 
     0, 
     0]

c = [-20,
     -15,
     ]

obj_val = 100

sense = ('<=', 'Max')

Global variables

var numVars

A = [[-2, -3], [-4, -2], [-3, -4], ]

b = [-5, -15, -20, ]

x_u = [9, 6, ]