Schedule Optimization with Python

  Рет қаралды 12,742

APMonitor.com

APMonitor.com

Күн бұрын

Schedule optimization maximizes productivity, minimizes costs and reduces delays. It is widely used in manufacturing, logistics, transportation, construction, project management, and healthcare. By optimizing schedules, organizations can allocate resources effectively, improve delivery times, and meet customer demands efficiently, leading to increased competitiveness and profitability.
🎓Schedule Optimization apmonitor.com/...
Manufacturing facilities employ expert schedulers and tools to help visualize and plan for production cycles, scheduled downtime, transitions, etc. This example is a comparison of three methods for scheduling problems:
1. Exhaustive search
2. Heuristic (Johnson's Rule)
3. Integer Programming
Objective: Minimize the delay for the production of 5 products on 2 machines. Each product requires a different amount of time to process for each step. The example demonstrates Gekko for solving scheduling problems and compares to exhaustive search and heuristic method.
There are 5 products that require 2 processing steps on separate machines. The two machines (machine Y and machine Z) work one after the other. A product must go through machine Y first and after that through machine Z. Both machines can work simultaneously, but each machine cannot work on more than 1 product at a time. The factory needs to minimize the time of production of all given products. This is equivalent to minimizing the idle time of machine Z.
Product P0 P1 P2 P3 P4
Machine Y: 10 20 15 40 8
Machine Z: 20 30 10 25 18

Пікірлер: 13
@codingspace1143
@codingspace1143 Жыл бұрын
Thanks for very useful video
@hassanlaqrabti4036
@hassanlaqrabti4036 Жыл бұрын
Thank you professor
@JosephReynolds-o4j
@JosephReynolds-o4j 10 ай бұрын
let's say you don't have fixed number of machines, and you're trying to determine the optimal number of machines to run based on demand
@apm
@apm 10 ай бұрын
We've been researching topics related to design (number or size of machines) and schedule optimization. Here are a few papers (among many with this current topic): Hill, D., McCrea, D., Ho, A., Memmott, M., Powell, K., Hedengren, J., A Multi-Scale method for combined design and dispatch optimization of nuclear hybrid energy systems including storage, e-Prime - Advances in Electrical Engineering, Electronics and Energy, Volume 5, 2023, 100201, ISSN 2772-6711, DOI: 10.1016/j.prime.2023.100201 Mojica, J.L., Petersen, D.J., Hansen, B., Powell, K.M., Hedengren, J.D., Optimal Combined Long-Term Facility Design and Short-Term Operational Strategy for CHP Capacity Investments, Energy, Vol 118, 1, pp. 97-115, January 2017, DOI: 10.1016/j.energy.2016.12.009. I recommend that you also look at work by Ignacio Grossmann at CMU and Christos Maravelias at Princeton for additional contributions to combined scheduling and design optimization.
@xondiego
@xondiego Жыл бұрын
Thanks for this video, a question is APMonitor and Gekko open source? let say if I work for a consultant and I want to use Gekko can I use it for free? otherwise how is the process for using gekko and APMonitor tools for optimization?
@apm
@apm Жыл бұрын
Yes, Gekko is freely available. The source is available from github.com/BYU-PRISM/GEKKO or install with "pip install gekko". It has the MIT License that allows any use, including commercial use.
@muhammadluthfi6887
@muhammadluthfi6887 Жыл бұрын
Thanks for the very insightful video. Im currently on the project of scheduling optimization of blending processes in refinery. is there any learn it further about it from the expert?
@apm
@apm Жыл бұрын
There is more information in these courses: apmonitor.com/me575 and apmonitor.com/do
@evantale3191
@evantale3191 2 ай бұрын
how should I modifies the code if I wanted to to schedule multiple task to the same type of machine that runs parallelly ? great video btw thankyou ! 😄🤝
@apm
@apm 2 ай бұрын
Here is sample code from ChatGPT 4o: from gekko import GEKKO m = GEKKO(remote=False) # Number of tasks num_tasks = 5 # Number of parallel machines for Y and Z num_machines = 2 Y = {0: 10, 1: 20, 2: 15, 3: 40, 4: 8} Z = {0: 20, 1: 30, 2: 10, 3: 25, 4: 18} # Decision variables x = m.Array(m.Var, (num_tasks, num_tasks, num_machines), value=0, lb=0, ub=1, integer=True) # Ensure each task is assigned to exactly one time slot on any machine for i in range(num_tasks): m.Equation(m.sum([x[i, j, k] for j in range(num_tasks) for k in range(num_machines)]) == 1) m.Equation(m.sum([x[j, i, k] for j in range(num_tasks) for k in range(num_machines)]) == 1) # Time to process on Y and Z ty = m.Array(m.Var, (num_tasks, num_machines)) tz = m.Array(m.Var, (num_tasks, num_machines)) for k in range(num_machines): for i in range(num_tasks): m.Equation(ty[i, k] == m.sum([x[i, j, k] * Y[j] for j in range(num_tasks)])) m.Equation(tz[i, k] == m.sum([x[i, j, k] * Z[j] for j in range(num_tasks)])) # Delay time on Z d = m.Array(m.Var, (num_tasks, num_machines), lb=0) s = m.Array(m.Var, (num_tasks, num_machines), lb=0) for k in range(num_machines): m.Equation(d[0, k] == ty[0, k]) m.Equation(s[0, k] == 0) for i in range(1, num_tasks): m.Equation(d[i, k] >= tz[i - 1, k] - ty[i, k] + s[i, k]) # Minimize the total delay and slack m.Minimize(m.sum(d[:,k])) m.Minimize(1e-3 * m.sum(s[:,k])) # Solve the problem m.options.SOLVER = 1 m.solve() # Print the results print('Order of processing, rows=order, columns=product, depth=machine') print(x) print('Time on machine Y') print(ty) print('Time on machine Z') print(tz) print('Delay') print(d) For specific questions, please ask on StackOverflow with tag [gekko].
@lazyac_
@lazyac_ 9 ай бұрын
thx does someone can help me with this?
@apm
@apm 8 ай бұрын
Sure, the code examples are available at apmonitor.com/me575/index.php/Main/ScheduleOptimization. If you need help with a specific problem, please post your code to Stack Overflow or use ChatGPT to get help.
@lazyac_
@lazyac_ 8 ай бұрын
Yes ChatGPT helped me! he used pulp library, i not sure about constraints he used but it works @@apm
Solve ODEs in Excel and Python
31:25
APMonitor.com
Рет қаралды 5 М.
Optimize with Python
38:59
APMonitor.com
Рет қаралды 14 М.
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 70 МЛН
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 16 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2 МЛН
Building AI Solutions with Google OR-Tools - Barry Stahl
1:04:09
NDC Conferences
Рет қаралды 23 М.
PuLP Tutorial: Linear Programming in Python
19:24
Mohammad T. Irfan
Рет қаралды 13 М.
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 831 М.
The Art of Linear Programming
18:56
Tom S
Рет қаралды 666 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 338 М.
Linear Programming in Python
15:53
APMonitor.com
Рет қаралды 6 М.
Optimization in Python: Pyomo and Gurobipy Workshop - Brent Austgen - UT Austin INFORMS
1:11:46
INFORMS Student Chapter - UT Austin
Рет қаралды 41 М.
The Boundary of Computation
12:59
Mutual Information
Рет қаралды 1 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 70 МЛН