Created
April 30, 2021 14:45
-
-
Save samirsaci/e1da3024cf0abd991519a7bf7ec25617 to your computer and use it in GitHub Desktop.
Bakery Optimization Project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pulp import * | |
| # Optimize your Bakery Model | |
| # Parameters | |
| items = ["A", "B", "C", "D", "E", "F"] | |
| profit = {"A":6, "B":4.4, "C":7.5, "D":0.9, "E":1.2, "F":2.2} | |
| baker = {"A":50, "B":0, "C":45, "D":35, "E":25, "F":0} | |
| oven = {"A":45, "B":0, "C":90, "D":20, "E":45, "F":0} | |
| display = {"A":4, "B":1.5, "C":3, "D":1, "E":1, "F":1} | |
| assist = {"A":0, "B":12, "C":0, "D":0, "E":0, "F":8} | |
| # Initiliaze Class | |
| model = LpProblem('Maximize Bakery Profits', LpMaximize) | |
| # 2. Define Decision Variables | |
| A = LpVariable('A', lowBound = 0, cat = 'Integer') | |
| B = LpVariable('B', lowBound = 0, cat = 'Integer') | |
| C = LpVariable('C', lowBound = 0, cat = 'Integer') | |
| D = LpVariable('D', lowBound = 0, cat = 'Integer') | |
| E = LpVariable('E', lowBound = 0, cat = 'Integer') | |
| F = LpVariable('F', lowBound = 0, cat = 'Integer') | |
| var_dict = {"A":A, "B":B, "C":C, "D":D, "E":E, "F":F} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment