In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
In [2]:
x = np.linspace(0, 1)
y = np.linspace(0, 1)
xx, yy = np.meshgrid(x, y)
In [3]:
plt.contourf(xx, yy, 2 * xx + 3 * yy, cmap=plt.cm.viridis)
plt.contour(xx, yy, 3 * xx + 4 * yy**2, colors='k')
plt.colorbar()
Out[3]:
Vamos a modelizarlo con Pyomo:
In [ ]:
In [ ]: