On 03/12/14 22:13, Philippe de Rochambeau wrote: > Hi, > > let me make my question more specific. > > I need to display the following hierarchical data, in a PDF document > > Manifest 1 > Drop 1 > Customer 1 > Customer 2 > Customer 3 > Drop 2 > Customer 1 > Customer 2 > Drop 3 > Customer 1 > Customer 2 > Customer 3 > Customer 4 > Customer 5 > Customer 6 > … > > Manifest 2 > Drop 1 > Customer 1 > Customer 2 > Drop 2 > Customer 1 > Customer 2 > Customer 3 >... Hi Philippe, A couple of thoughts: The problem of allocating 'drops' to 'pages' is in principle a bin packing problem, but the details make it somewhat more complex. I have written a short introduction for how to solve bin packing problems with ECLiPSe's bin_packing/3 constraint, see http://eclipseclp.org/wiki/Examples/BinPacking If I understand correctly, you want to keep the drops belonging to the same manifest together. Do you want to preserve the order of drops within a manifest? Do you allow splitting a drop? Extra complication comes from needing extra header lines when splitting. Sometimes there will be a choice between splitting a manifest and having less pages, and not splitting the manifest at the cost of extra pages. You have to specify what your preferences are in such cases. -- JoachimReceived on Sat Dec 06 2014 - 20:55:38 CET
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:21 CEST