Constrained Optimization
The ability to find the maximum or minimum of a function subject to constraints.
Question template
A cattle farm mixes its feed from corn and soybean meal. It can use any amount of each, including part of a sack. Each sack of corn costs $c1 and provides a11 units of protein and a21 units of energy; each sack of soybean meal costs $c2 and provides a12 units of protein and a22 units of energy. The day's feed must provide at least b1 units of protein and at least b2 units of energy. Meeting these requirements at the lowest possible cost, what is the minimum cost of feed?
Use it
from datasets import load_dataset
ds = load_dataset("narunraman/steer", "constrained_optimization")curl "https://steer-benchmark.cs.ubc.ca/api/sample?element_name=constrained_optimization&n=5&seed=42"
See the Reference for the parameters.