Optimize with Python

  Рет қаралды 15,191

APMonitor.com

APMonitor.com

Күн бұрын

Пікірлер: 16
@pnachtwey
@pnachtwey 4 ай бұрын
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.
@kurniawanSA
@kurniawanSA Жыл бұрын
25:43 MILP
@maximinmaster7511
@maximinmaster7511 Жыл бұрын
hello, your examples really speak to me, do you have other sources where I can find examples in the different models of scipy? THANKS
@apm
@apm Жыл бұрын
Sure, there are a few examples in the online courses for Process Dynamics and Control (apmonitor.com/pds), Design Optimization (apmonitor.com/me575) and Engineering Programming (apmonitor.com/che263). Here is one in particular: apmonitor.com/che263/index.php/Main/PythonOptimization
@ahzanulkholish7419
@ahzanulkholish7419 Жыл бұрын
It's very interesting, thank you. Question, any idea how to visualize the last MINLP case ?
@apm
@apm Жыл бұрын
Sure, here is a contour plot of a related problem that shows the optimal steps towards the solution. You'd just need to modify this visualization to include integer points. apmonitor.com/me575/index.php/Main/BoxFolding
@mohamedyusufmohamud8193
@mohamedyusufmohamud8193 Жыл бұрын
Thank you ❤
@usefulknowledge6074
@usefulknowledge6074 Жыл бұрын
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?
@apm
@apm Жыл бұрын
For minimization, there are two local solutions. When using the initial guess "x.value=2.25; y.value = 2", the solution is "x: 2.5 y: 2.0 obj: 0.25" (Global optimum). When using the initial guess "x.value=1.25; y.value = 3", the solution is "x: 1.0 y: 3.0 obj: 1.0". When switching to maximization with "m.Maximize(x*y**2-x**2-y**2)", there is one local / global solution at "x: 1.6666666667 y: 3.0 obj: 3.2222222222". Even though the line extends, it is not in the feasible region because y
@محمدحسینتوکلی-و7ي
@محمدحسینتوکلی-و7ي 2 ай бұрын
@@apm sorry but when we put x:1 and y:3 the obj will be -1 and its smaller than 0.25, so this wont make (x,y)=(1,3) the global solution?
@apm
@apm Ай бұрын
Thanks for catching that. I was reporting -obj in the script. This is only needed when reporting Maximization problems because the solver automatically converts Maximization problems to Minimization problems. You are correct that -1 is the global minimum.
@kisvarosipari
@kisvarosipari Жыл бұрын
great tutorial
@jakemohammd4279
@jakemohammd4279 Жыл бұрын
Thanks
@gerrardroger
@gerrardroger Жыл бұрын
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
@apm
@apm Жыл бұрын
Great question - I think I have a solution. Could you ask the question on StackOverflow so that it is easier to find for others who have a similar question? stackoverflow.com/questions/tagged/gekko
Global Optimization with Python
20:14
APMonitor.com
Рет қаралды 4,1 М.
SciPy Beginner's Guide for Optimization
11:03
APMonitor.com
Рет қаралды 298 М.
Random Emoji Beatbox Challenge #beatbox #tiktok
00:47
BeatboxJCOP
Рет қаралды 66 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 6 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 2,8 МЛН
Основы SciPy | Научные И Математические Вычисления На Python
1:02:01
PyLounge - программирование на Python и всё о IT
Рет қаралды 15 М.
The Art of Linear Programming
18:56
Tom S
Рет қаралды 692 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 1 МЛН
Terence Tao at IMO 2024: AI and Mathematics
57:24
AIMO Prize
Рет қаралды 603 М.
Optimization in Python: Pyomo and Gurobipy Workshop - Brent Austgen - UT Austin INFORMS
1:11:46
INFORMS Student Chapter - UT Austin
Рет қаралды 41 М.
Football AI Tutorial: From Basics to Advanced Stats with Python
1:30:19
Linear Programming in Python
15:53
APMonitor.com
Рет қаралды 6 М.
Глюк на моем iPhone 16 Pro Max
0:26
ТЕХНОБЛОГ ГУБАРЕВ СЕРГЕЙ
Рет қаралды 1,3 МЛН
Не бойтесь экраны "водопады"
1:00
Бананикс
Рет қаралды 374 М.
Не бойтесь экраны "водопады"
1:00
Бананикс
Рет қаралды 374 М.