Re: [eclipse-clp-users] y = a1b1 + a2b2 + a3b3 + ... + anbn

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Sat, 06 Dec 2014 20:55:28 +0000
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.


-- Joachim
Received on Sat Dec 06 2014 - 20:55:38 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET