Tom's solution for the Gadgets & More Inc. problem:
from pyomo.environ import *
from pyomo.opt import *
opt = solvers.SolverFactory("ipopt")
model = ConcreteModel()
model.x = Var(within=NonNegativeReals)
model.y = Var(within=NonNegativeReals)
model.c = Constraint(expr = 4*model.y + 6*model.x <= 24)
model.z = Objective(expr = 2*model.x**2 + model.y**2, sense=maximize)
results = opt.solve(model)
model.x.get_values()[None]
model.y.get_values()[None]
model.z.expr()