1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Optimization in Python

Connected

Exercise

Handling hard inequalities

Back in the coffee shop, you want to look at minimizing daily expenses. You have an objective function that calculates your production costs, and a constraint function that tells you the limits of how much coffee you can produce.

Apply scipy to find the optimal allocation of resources to minimize costs.

Instructions

100 XP
  • Set the constraint variable using a dictionary.
  • Apply scipy to find the optimal value.