from pymprog import *

"""
Explanation: Homework 04 - Simplex method
In python we can find a set of libraries which has been implemented for a wide community of developers, let's use one of these.
Pymprog is one library which implements the simplex method.
End of explanation
"""


x, y = var('x,y')

"""
Explanation: Let's define our variables in a symbolic way.
End of explanation
"""


maximize(20*x+30*y, 'profit')
3*x + 6*y <= 150
x + 0.5*y <= 22
x + y <= 275
solve()

print 'pasteles tipo P = %g;' % x.primal
print 'pasteles tipo Q = %g;' % y.primal 

"""
Explanation: Now we are going to set our restrictions.
End of explanation
"""


