Best Scenario (Optimization)

조회 수: 1 (최근 30일)
John Doe
John Doe 2020년 2월 24일
댓글: Walter Roberson 2020년 2월 25일
Hello everyone,
I have the following table. In my colums (AA to DD) I have durations (in hrs), and the Name column tells me the location. So for example AA has to spent 148 hrs in 1A to get things done and if AA works alone it'll spend a total of 74 days (assuming it works 15 hrs/day and 7 days), the same thing for BB, etc.
Now I want to choose AA but I want to get things done in 6 weeks instead of 10.5, so I want the help of BB or CC or DD.
Visually speaking, I thought AA could spend time in specific locations spending a time of 5.9 weeks and BB in the rest spend 6.4 (a bit higher than 6 weeks) so maybe a location can be shared.
I want to try to see what scenario matlab would give me, but I don't know how to even start it.
I thought maybe a while loop could be the answer but the more I try the more I get lost. I know I want to use AA but I don't know which location would be best for it (time wise) and in which combination BB/CC/DD.
Any guidance would be appreciated. If anything is unclear please let me know
Thank you
  댓글 수: 3
John Doe
John Doe 2020년 2월 24일
Hello walter,
Thank you for the links, I looked through them and I'm honeslty still a bit lost. I thought maybe I could try to limit myself with AA and BB then check which combinations would give me shortest time. so i tired this:
a= rowAA; b= rowBB
[A,B] = meshgrid(a,b);
c=cat(2,A',B');
d=reshape(c,[],2);
but it doesn't consider if I could use only alone AA or BB for a specific location. So, my thoughts are still a bit confused
Walter Roberson
Walter Roberson 2020년 2월 25일
There are some circumstances where it can make sense to "brute force" all of the possibilities -- cases where there is a definite endpoint and there are not too many possibilities.
In one sense you do not have a definite endpoint, because in theory you could try with larger and larger gaps between events being potentially scheduled. We know from our common sense that after a certain point, the results are only ever going to get worse, but the brute force approach does not know that: brute force would say that you have to evaluate all of the possibilities before deciding on the best one. Any strategy that generates possibilities on the fly and reasons that it is not worth generating more because they are sure to be worse than what you have, is effectively an Operations Research strategy. The really good Operations Research strategies can be amazingly efficient.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by