Home > Back-end >  Please the great god solve the problem of an optimal loading
Please the great god solve the problem of an optimal loading

Time:11-17

Suppose there are n ship, the ship interior space of Li respectively, Wi, Hi, the maximum load for WTi (I=1, 2, 3,... Can be stacked m, n), there is a goods, long, wide, high, heavy Lj, respectively, Wj, Hj, WTj (j=1, 2, 3,... - m), stack, l a goods, long, wide, high, weight of Lk respectively, Wk, a Hk, WTk (k=1, 2, 3,... , l), under the restricted condition of the ship itself, how to load can be achieved with the least amount of boat loaded most of the goods?

CodePudding user response:

This involves the depth or breadth search,
The condition of unknown, you do not,
If the scope is not limited, may search time? Day,

CodePudding user response:

Thank you, can range is limited, but now I mostly don't know how to solve, mainly want to please the great god advice algorithm,

CodePudding user response:

1, generally using the depth-first search method, breadth-first search method, is actually a simulated artificial move binning,

2, do you want to build a data model, to make the data node (can step by step search node),
For example:
(1) the object by the long, wide, high, weight, build an array;
(2) the hull of the warehouse, the establishment of a space model of storage, can make the object, in turn, storage, and record down, into an object, will save set pattern, in order to convenient comparison,
(3) search for recursive statements,

Of these, only hint, to set up the actual operation there is a lot of conditions,

CodePudding user response:

I don't relish on published
  • Related