Complex scheduling with recurrences

UrbanS

New Member
Joined
Jan 28, 2020
Messages
3
Office Version
  1. 365
Platform
  1. MacOS
Hello,
I have a need to simulate jetty scheduling in excel (automatic scheduling by changing input data - number of customers, number of ships per year per customer - where different customers may have different number of ships). For a period of one year 104 ships will dock at the jetty. There will be 4 customers using the jetty. 1st customer will bring 11 ships, where the other 3 customers will bring 31 ships each. Between two consecutive ship arrivals at least 3 days must pass. Customers must also be split during the year equally meaning if a ship from customer A arrives, the next ship must be from an other customer and the next one from a third one and so on.
Appreciate any help,
Urban
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi,

Assuming the customers are A B C D, here is the order of ships arriving:

ABCDABCABCABCDABCABCABCDABCABCABCDABCABCABCDABCABCABCDABCABCABCDABCABCABCDABCABCABCDABCABCABCDABCABCABCD

It has 31 A, 31 B, 31 C, 11 D.

Schedule them every 3 days, which totals 324 days. You are left with 24 or 23 days, depending on the lear being leap or not. You can use insert them anywhere in the schedule.

J.Ty.
 
Upvote 0
Hi J.Ty.,

thank you for the prompt reply. This would work as long as number of customers and ships stays unchanged, but the model should be able to adopt automatically by changing number of customers and/or number of ships per each separate customer as mentioned at the beginning of the question.

Best regards,
Urban
 
Upvote 0
Dear Urban,

OK.
The general algorithm is as follows:
  1. Make a list of time slots, every 3 days, which gives 121 or 122 slots per year (column A).
  2. Have a list of companies (A, B,...) in column C, each with number of its ships (column D).
  3. First fill all odd numbered slots starting from 1, filling them first with all ships of company A, then all of B, and so on, until all odd slots are exhausted (formulas in column B).
  4. Continue in the same manner, but filling even positions now and starting from slot 2 (formulas in column B).
  5. Column E is with helpdata, to make computing ships easier.
  6. Finally I have sorted the ships by slot numbers, to get the final schedul (columns G and H).
  7. At the end you get a good schedule, and if two ships of the same company are positioned next to each other, it means that no schedule satisfying your requirements exists.
The model is made in Excel 365 with Array Functions - I hope you do have them. It is a smaller one, to make it fit on the screen.

J.Ty.

Book1
ABCDEFGH
1SlotCompany# of ShipscumulativeANSWER
21AA22SLOTSHIP
33AB241A
45BC372C
57BD4113A
69CE1124D
711C5B
82C6D
94D7B
106D8D
118D9C
1210D10D
1312E11C
1412E
Sheet4
Cell Formulas
RangeFormula
G3G3=SORT(A2:B13,1)
E2E2=D2
E3:E6E3=E2+D3
B2:B13B2=XLOOKUP(ROW()-1,$E$2:$E$6,$C$2:$C$6,"",1)
 
Last edited:
Upvote 0
My model is here, you can play with it.

J.Ty.
 
Upvote 0
Thank you for the feedback and good luck!

J.Ty.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top