Assemble job with variable counting

Post Reply
ThomasDeschamps
Member
Posts: 21
Joined: Wed Jul 20, 2016 12:03 pm

Assemble job with variable counting

Post by ThomasDeschamps »

Hi everybody,
Excuse me by advance for my english, but it's not my mother tongue,

We are a Book on demand printer, and our intern software create a XML with all data needed for imposition, and automation. (see below)

For exemple :

Code: Select all

		<GroupedeCMDE>160720_CustomerX_133106</GroupedeCMDE>
		<NProduit>359479</NProduit>
		<CouvRV>NON</CouvRV>
		<Reliure>DCC</Reliure>
		<TypeImpression>NB R/V</TypeImpression>
		<PapierCouv>Invercote 240g SAT</PapierCouv>
		<PapierInt>BOUFFANT 80 GRS</PapierInt>
		<Quantite_Couverture>1</Quantite_Couverture>
		<Quantite_Interieur>1</Quantite_Interieur>
		
Each product belong to an order <GroupedeCMDE> and have diffent order quantity <Quantite_Interieur>.

In order to save paper, time (and money) we want to assemble multiple job with same parameter (let's say <PapierInt> and <TypeImpression> and GroupedeCMDE>) on one imposition. On this imposition, we want to assemble up to 8 book.
For quantity = 4 or >=8 we have another process.

A key point is that we can't have a book splitted on two imposition.
For now, i split my job in different process :

Code: Select all

Assemble up to 8 files with quantity = 1 and sames properties
Assemble up to 4 files with quantity = 2 and sames properties
Assemble up to 2 files with quantity = 3 and sames properties
Quantity = to 5-6-7 no assemble.
Each assemble have a "After N minutes" to let pass if there isn't file for this order anymore.


But i feel it can be a better and efficient way to do this. Let's take an exemple :
I have 5 order (A to E) with different quantity and sames property:

Code: Select all

A : 1
B : 2
C : 5
D : 6
E : 3
The best wasy to optimize this is to do the following imposition :

Code: Select all

A + B + C = 1 + 2 + 5 = 8 book
D = 6 book
E = 3 book
Or :

Code: Select all

B + D = 2 + 6 = 8 book
C + E = 5 + 3 = 8 book
A = 1 book

But i don't want to have :

Code: Select all

A + B + C = 8
D + 2 first book of E = 8
Last book of E = 1

We don't care for now to have the "most efficient" process, if the last files aren't fully optimized it's OK

I tryed few thing with "complete condition", but it's not working, any hint?
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Assemble job with variable counting

Post by freddyp »

You are using information from multiple jobs to come to a conclusion and it is very specific -> scripting.

You could either use a script expression on the "Job identifier" and "Number of files" properties of "Assemble job - Scheme - Custom" or you could create your own assemble job script that loops over the waiting jobs and combines in the right way.
Post Reply