Unloading containers by order - optimisation

5 views (last 30 days)
Hello I have a matrix that represents the loading bay of a cargo ship. It contains for example 15 containers (numbered 1 to 15) and I have to remove all of those containers, beginning from 1 to 15. A container can only be removed if there is no container above him, containers can be stacked by pile not exceding 5.
For example :
A = [0 0 0 0 0
0 0 0 0 0
9 15 4 14 2
13 1 7 5 10
8 6 12 3 11]
I have to have a historiv of all the moves or example : Ct 15 From stack 2 to 4 ; (then 1 is removed) (then 2 is removed) Ct 4 from stack 4 to 1 ...
Can anyone help ?

Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!