Optimize with Python

preview_player
Показать описание
Engineering optimization platforms in Python are an important tool for engineers in the modern world. They allow engineers to quickly and easily optimize complex engineering problems and tasks, such as design optimization, resource allocation, and route planning. This notebook has examples for solving LP, QP, NLP, MILP, and MINLP problems in Python.

1️⃣ Linear Programming (LP)
2️⃣ Quadratic Programming (QP)
3️⃣ Nonlinear Programming (NLP)
4️⃣ Mixed Integer Linear Programming (MILP)
5️⃣ Mixed Integer Nonlinear Programming (MINLP)

0:00 Optimize with Python
1:22 Linear Programming (LP)
9:53 Quadratic Programming (QP)
19:00 Nonlinear Programming (NLP)
24:16 Mixed Integer LP
29:00 Mixed Integer NLP
31:20 Box Folding MINLP
Рекомендации по теме
Комментарии
Автор

This is the way to teach. The jupyterlab is prepared so there is no time wasted writing on a chalkboard. Also, there are files to play with. This is much better than the MIT lectures where the professor talks with his back to the students while copying his notes to a blackboard where the students must take notes but there is no working solution.

pnachtwey
Автор

hello, your examples really speak to me, do you have other sources where I can find examples in the different models of scipy? THANKS

maximinmaster
Автор

I don't understand how the solution at min 23:16 is the correct one for the figure shown. The contour line with value 3 intersects the region at a point beyond x=1.75. Can you cross-check?

usefulknowledge
Автор

It's very interesting, thank you.
Question, any idea how to visualize the last MINLP case ?

ahzanulkholish
Автор

Hi John, I want to maximize profit/revenue with binary variables, but result always coming as nan, can you tell why, I want to achieve max gross profit margin, trying to solve with gekko mixed integer non linear programming as you showed
say whether products will be in mix or not by that binary variables will be 1 or 0, here is the example for 3 products, variables are x1, x2 and x3
total profit = 150*x1 + 120*x2 + 100*x3
total revenue = 200*x1 + 150*x2 + 250*x3

m = GEKKO()
x1 = m.Var(integer=True, lb=0, ub=1)
x2 = m.Var(integer=True, lb=0, ub=1)
x3 = m.Var(integer=True, lb=0, ub=1)
m.Maximize((150*x1 + 120*x2 + 100*x3)/(200*x1 + 150*x2 + 250*x3))
m.Equation(x1 + x2 + x3 = 2)
m.options.SOLVER = 1
m.solve()

it is giving me solution as all x is 0, objective function as nan
I have tried only with the numerator i.e profit maximization, then it is working, but with the denominator it is not working
thanks in advance

hoqcszf