How to plot Gantt Chart for job shop scheduling?

5 ビュー (過去 30 日間)
Pandiyaraj Gnanasekar
Pandiyaraj Gnanasekar 2019 年 12 月 3 日
回答済み: Alexis Wang 2022 年 8 月 30 日
Does anyone know, how to plot Gantt Chart for Job shop scheduling using barh function in Matlab. Please help me to figure out a way to solve this or give some guidance for the same. Thanks in advance.

回答 (2 件)

Stijn Haenen
Stijn Haenen 2019 年 12 月 4 日
Do you mean something like this:
Number_of_tasks=20;
width=200/Number_of_tasks;
startDates=1:20;
endDates=3:22;
for i=1:Number_of_tasks
plot([startDates(i),endDates(i)],[Number_of_tasks+1-i,Number_of_tasks+1-i],'b','Linewidth',width)
hold on
end
labels=['a';'b';'c';'d';'e';'f';'g';'h';'i';'j';'k';'l';'m';'n';'o';'p';'q';'r';'s';'t'];
set(gca,'YTickLabel',labels)
  1 件のコメント
Pandiyaraj Gnanasekar
Pandiyaraj Gnanasekar 2019 年 12 月 6 日
Hello Mr. Stijn Haenen,
Your answer is a kind of thing, I am searching for. But in my case I have to schedule n number of jobs in m number of machines and each Job should be plotted properly based on the input.
for example if I have a 3 jobs J1, J2, J3 which will have processing time as follows,
[J1,J2,J3] = [7,8,10; 6,4,12; 8,8,7] respectively. each job should be machined in each machiens of M1,M2,M3 based on some criteria or conditions. with those conditions we can obtain start time nd end time of each job on each machines. Then we have to plot those data in to graph which should be a Gantt Chart. I don't know whether I explained it correctly or not. Please bear my explanation. Thank you.

サインインしてコメントする。


Alexis Wang
Alexis Wang 2022 年 8 月 30 日
It uses patch instead of barh though, and draws each bar for every task. However, the user just needs to pass in tasks and other time data to plot a Gantt chart (details in the link above). Feel free to let me know if you have any questions. Hope that helps!

カテゴリ

Help Center および File ExchangeEquivalent Baseband Simulation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by