• Aucun résultat trouvé

Knapsack Problems with Setups

N/A
N/A
Protected

Academic year: 2021

Partager "Knapsack Problems with Setups"

Copied!
32
0
0

Texte intégral

(1)

HAL Id: inria-00232782

https://hal.inria.fr/inria-00232782v2

Submitted on 27 Nov 2008

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Knapsack Problems with Setups

Sophie Michel, Nancy Perrot, François Vanderbeck

To cite this version:

Sophie Michel, Nancy Perrot, François Vanderbeck. Knapsack Problems with Setups. European

Journal of Operational Research, Elsevier, 2009, 196, pp.909-918. �inria-00232782v2�

(2)

S. Mihel (1), N. Perrot (2) and F. Vanderbek (3)

(1) ISEL-LMAH,UniversitéduHavre,mihelsuniv-lehavre.fr

(2)Frane-Téléom,divisionR&D, nany.perrotorange-ftgroup.om

(1)InstitutdeMathématiquesdeBordeaux,UniversitéBordeaux1,fvmath.u-bordeaux1.fr

November 27, 2008

Abstrat

Knapsak problems with setups nd their appliation in many onrete indus-

trialandnanialproblems. Moreover,they alsoariseassubproblemsinaDantzig-

Wolfe deomposition approah to more omplex ombinatorial optimization prob-

lems,wheretheyneedtobesolvedrepeatedlyandthereforeeiently. Here,weon-

siderthemultiple-lassintegerknapsakproblemwithsetups. Itemsarepartitioned

into lasses whose use implies a setup ost and assoiated apaity onsumption.

Item weights are assumed to be a multiple of their lass weight. The total weight

of seleted items and setups is bounded. The objetive is to maximize the dier-

enebetween theprotsofseleteditemsandthexedostsinurredforsetting-up

lasses. Aspeial aseis thebounded integer knapsakproblemwith setups where

eahlassholdsasingleitemandits ontinuousversionwherea frationofan item

an be seleted while inurring a full setup. The paper shows theextent to whih

lassial resultsfor the knapsak probleman be generalized to these variants with

setups. Inpartiular, an extension of thebranh-and-bound algorithm of Horowitz

andSahniis developed for problemswithpositivesetuposts. Ourdiret approah

isompared experimentallywiththe approah proposedintheliterature onsisting

inonverting the problem into a multiple hoie knapsak withpseudo-polynomial

size.

Keywords: Knapsak problem, xed ost, setup, variable upper bound, branh-and-

bound.

The Multiple-lass Integer Knapsak problem with Setups (MIKS) is dened as fol-

lows. The knapsak has apaity

W

. There are

n

item lasses, indexed by

i = 1, . . . , n

,

with assoiated setup ost,

f

i

∈ IR

, and setup apaity onsumption,

s

i

∈ IR

+. Eah

lass is made of itsown items

(i, j)

for

j = 1, . . . , n

i

∈ IN

with assoiated prot

p

ij

∈ IR

(3)

and upper bound

u

ij

∈ IN

. The apaity onsumption of item

(i, j)

is assumed to be a

multiple of a lass weight,

w

i

∈ IR

+, i.e.

w

ij

= m

ij

w

i for some multipliity

m

ij

∈ IN

(assuming

w

ij

≤ W

). Moreover, there are lower and upper bounds,

a

i

≤ b

i

∈ IN

, on

the total multipliity of items that may be seleted within eah lass. The objetive is

to maximize the sum of the prots assoiated with seleted items minus the xed osts

inurred for setting-up lasses.

Thus, model MIKStakesthe form:

max

X

n

i=1 ni

X

j=1

p

i j

x

i j

X

n

i=1

f

i

y

i (1)

[

MIKS

]

s.t.

X

n

i=1

((

ni

X

j=1

m

i j

w

i

x

i j

) + s

i

y

i

) ≤ W

(2)

a

i

y

i

ni

X

j=1

m

i j

x

i j

≤ b

i

y

i for

i = 1, . . . n

(3)

x

i j

≤ u

i j

y

i for

i = 1, . . . n

and

j = 1, . . . , n

i (4)

x

i j

∈ IN

for

i = 1, . . . , n

and

j = 1, . . . , n

i (5)

y

i

∈ {0, 1}

for

i = 1, . . . , n ,

(6)

where

x

ij denotes the number of opies of item

j

that are hosen within lass

i

and

y

i

= 1

i lass

i

issetup. Themain developmentsofthe paperare madeunderrestritive assumptions that simplify the haraterization of extreme solutions of the ontinuous

relaxation. In our branh-and-bound algorithms, we shall assume that xed osts are

non-negative:

Assumption 1 (restritive)

f

i

≥ 0

for all

i

,

and that there are no lass lower bounds:

Assumption 2 (restritive)

a

i

= 0

for all

i

.

ModelMIKS hasseveral interesting speial ases. In abinarymodel, denoted MBKS,

x

i j

∈ {0 , 1} ∀ij

. When eah lass holds a single item, i.e.

n

i

= 1 ∀i

, MIKS gives rise to

the integer knapsak problemwith setups (IKS):

max

X

n

i=1

p

i

x

i

X

n

i=1

f

i

y

i (7)

[

IKS

]

s.t.

X

n

i=1

( w

i

x

i

+ s

i

y

i

) ≤ W

(8)

a

i

y

i

≤ x

i

≤ b

i

y

i for

i = 1, . . . n

(9)

x

i

∈ IN

for

i = 1, . . . , n

(10)

y

i

∈ {0, 1}

for

i = 1, . . . , n .

(11)

(4)

Further relaxing the integrality onstraint on

x

i gives rise to the ontinuous knapsak

problemwithsetups denoted CKS.Observethat, when

a

i

= w

i

= 0

and

b

i

= 1 ∀i

, allthe

above models boil down toa standard binary knapsak problem (f.i.,for IKS, as

w

i

= 0

,

it is optimal to set

x

i

= b

i if

p

i

≥ 0

). Hene, these models are at least as hard as the

standard binary knapsak problem.

ModelCKSarises as asub-problemin apaitated multi-item lot sizing problemwhen

settingupthemahinefortheprodutionofanitemrequiressetuptimeandost: onethe

demand overing onstraints are dualized the problem deomposes into a CKS problem

for eah period. Then,

w

i,

f

i and

s

i are respetively the proessing time, the setup ost andthe setuptimeforitem

i

,

p

i isthedierenebetween thedual valueforoveringitem

i

demand and itsprodution ost,

W

is the mahine apaity of that period, and

[a

i

, b

i

]

denes aninterval of validprodutionlevels for item

i

. A lower bound

a

i on prodution

may arise due to a business rule to amortize setup or due to tehnial onstraints that

translateinto aminimum bathsize. Note that,for this appliation, xed ost naturally

satisfyAssumption 1. Goemans [4℄studiedthestruture ofthe CKS polyhedron, derived

faetdening inequalitiesand proposed a heuristiseparation proedure.

Model IKS is enountered as a sub-problem in solving the utting stok problem by

branh-and-prie [10℄. When using branhing onstraints that enfore integrality of the

numberofuttingpatterns thatinvolveagiven item

i

,the knapsaksubproblem mustbe

modied to inlude a xed ost. Nonzero lower bounds,

a

i, may arise in the ourse of a

rounding heuristi when, in order to ahieve a feasible solution to the residual problem,

one must impose a minimum prodution level in remainingutting patterns. A speial

ase of model IKS was studied by Sural et al. [13℄: they assume

f

i

= 0

and

w

i

= 1

for

all

i

. Then, they show how to generalize the Dantzig's upper bound and they propose

a primal heuristi. Both are used for setting up a depth-rst searh branh-and-bound

algorithm. Their motivations for studying this model were appliations in nane and

in mahine sheduling. The assumption

w

i

= 1

is not restritive for IKS but assuming

f

i

= 0

is restritive. However, the Dantzig's upper bound an be generalized tothe ase

f

i

6= 0

as shown inthis paper.

Model MBKSalsoarisesasa sub-probleminabranh-and-prieapproahtothe ut-

ting stok problem. Most frationalsolutions an be ut-o by boundingthe number of

utting patterns that involves a spei binary variable of the knapsak subproblem in

its 0-1 form [14℄

1

. When a branhing onstraint is added that restrits the number of

1

Thepriing problem is normally aninteger knapsak problem:

max{ P

i

p

i

x

i

: P

i

w

i

x

i

≤ W, x

i

≤ b

i

, x

i

∈ IN ∀i}

. Astandard0-1transformationonsistsinintroduing

n

i

= ⌊log

2

b

i

⌋+1

binaryitems

(i, j)

foreahintegeritem

i

with multipliity

m

i j

= 2

j−1 for

j = 1, . . . , n

i

− 1

and

m

i ni

= b

i

− P

ni−1 j=1

m

i j.

(5)

olumnsinvolvinga speibinary item

(i, j)

,the itemdual prieismodied inthe pri-

ingproblem,leadingtoobjetiveoeients

p

i j

6= m

ij

p

i. Ifoneombinessuhbranhing

with that on the number of utting pattern involving a spei item

i

, then xed osts

are also nonzero, giving rise to modelMBKS. Observe that if the binary deomposition

of the priingproblem is not done apriori but dynamially asbranhing onstraints are

introduedonspei binaryitems(see [16℄ fordetails),thenmodelMIKSmust beused.

The speial ase of model MBKS with no setups is treated in [15℄. Under the as-

sumption

f

i

= s

i

= 0 ∀i

, it is shown that the LP-relaxation an be solved by a greedy algorithmin linear time, a result that extends those of Dantzig [3℄ and Balas and Zemel

[1℄ for the 0-1 knapsak problem(this result relies on the assumption that item weights

are a multiple of their lass weight); exat algorithms are derived (branh-and-bound or

dynami programs) by adapting existing algorithmsfor the 0-1knapsak problem.

Variantsof modelMBKS are onsidered in the literature. Chajakis and Guignard[2℄

onsider a model where

m

ij

= 1 ∀ij

, lass bound onstraints are replaed by

P

nj=1i

x

i j

≥ y

i

∀i

, and the item weights are not restrited to be a multiple of a lass weight (hene,

the result of [15℄ onerning a polynomialgreedy solution of the LP relaxation does not

extend to the modelof [2℄). The appliation that motivated their study is the shedul-

ing of parallel unrelated mahines with setups where this knapsak problem arises as

a subproblem. They propose and test two approahes: either a dynami programming

solver or a two-stage approah. In the latter, the problem is transformed into a stan-

dard multiple hoie 0-1 knapsak problem and solved either by dynami programming

or branh-and-bound. The transformation onsists in dening a pseudo-item for eah

dominant feasible solutionswithin a lass. These dominant solutions are the states of a

dynamiprogramforsolvingthebinaryknapsakproblemdenedonasinglelass. There

is a pseudo-polynomial numberof them. They found that, for orrelated instanes with

small knapsak apaity (they assume integer data and onsider

W ≤ 500

), the diret

dynami programming approah is the most eient. When the number of families or

the knapsak apaity inreases, the two-stageapproah using branh-and-bound for the

seond stage isthe most eient.

The variant of model MBKS that is onsidered by Jans and Degraeve [5℄ is simpler.

They also assume

m

ij

= 1 ∀ij

and

w

ij

6= m

ij

w

i, but their model has

b

i

= 1 ∀i

. This

However, this transformation introdues multiple 0-1 representation of a given integer solution. The

alternative0-1deompositionproposedin[15℄istoset

m

i ni

= 2

ni. Then,oneneedstointrodueexpliit

lassupperbounds:

P

ni

j=1

m

i j

x

i j

≤ b

i

∀i

. Itguaranteesauniquerepresentationofeahintegersolution.

Thisisessentialtoavoidtheenumerationofsymmetrisolutions. Anumerialomparisonofbranh-and-

boundapproahesbasedonthestandard0-1transformationversusthemultiplelassmodelispresented

in[15℄;itshowstheinreasebranh-and-boundtreesize thatmayresultfromignoring thissymmetry.

(6)

It takes the form

max{ X

i

( X

j

p

ij

x

ij

− f

i

y

i

) : X

i

( X

j

w

ij

x

ij

+ s

i

y

i

) ≤ W, X

j

x

ij

≤ y

i

∀i, x

ij

, y

i

∈ {0 , 1}}

where setting

x

ij

= 1

amounts to produing item

i

so as to over demands from the

urrent period

t

up to

t + j − 1

. Moreover, their appliation assumes positive xed ost

f

i

≥ 0

. In this speial ase, feasible solutions verify

x

ij

= x

ij

y

i. Therefore, their model

redues to a standard multiple hoie knapsak problem

max{ X

ij

˜

p

ij

z

ij

: X

ij

˜

w

ij

z

ij

≤ W, X

j

z

ij

≤ 1 ∀i, z

ij

∈ {0, 1}} ;

where

z

ij

= x

ij

y

i,

p ˜

ij

= p

ij

− f

i, and

w ˜

ij

= w

ij

+ s

i. Jans and Degraeve [5℄ developed

their own branh-and-bound algorithmfor it.

The present paper proposes ananalysis of models CKS and MBKS. Their extensions

tomodelsIKSandMIKSare alsodisussed. The aimistoshowthe extenttowhihlas-

sialapproahfortheknapsakproblem,suhasthedepth-rst-searhbranh-and-bound

algorithm of Horowitz and Sahni or dynami programs (see [8℄ pages 30-31 or [9℄ pages

455-456) an be generalized to variants with setups. In partiular, we show that under

assumptions slightly less restritive than Assumptions 1 and 2, the LP solutionto these

problemsan beobtainedinpolynomialtime byagreedyproedure. Thekeytothesere-

sults are reformulationas ontinuous knapsak problems with multiplehoie onstraints

[6℄orlassbounds[15℄. Theformulationare polynomialinsizewhilepreviouslyproposed

reformulations suh as that of [2℄ are pseudo-polynomial. However, our reformulations

are onlyvalid for the LP-relaxation: their integer ounterparts are not equivalent to our

models. Therefore, the greedy LP solverdoesnot immediatelygive rise to extensions of

standard branh-and-bound proedures. The other main ontribution of the paper is a

spei enumeration sheme for branh-and-bound for CKS and MBKS that exploit the

property of optimal solutions and the greedy ordering of the LP bound. The resulting

branh-and-bound algorithmsare tested and ompared to existing approahes.

Dynami programming reursion an also be derived for these knapsak models with

setups. They are straightforward extensionof resultsforthe standard knapsak problem.

We present them for the sake of establishing the omplexity of the various models. Of

ourse,theimprovementsofthe basitehniquesforknapsakproblems: lineartimeom-

putation of upper bound [1℄, improved variants of Dantzig's bounds, improved dynami

reursion (f.i. using bounds to eliminate intermediate states, exploiting the ore, or so-

alled balaned enumeration), more sophistiated branh-and-bound (f.i. making use of

dominanerules)andhybridmethods[12℄ouldalsobereviewed forthease ofproblems

(7)

tehniques toget apoint aross: todemonstrate thatknapsak problems withsetups are

not muh harder than standard knapsak problems.

1 The ontinuous knapsak problem with setups

In modelCKS, the item seletionvariables,

x

, are allowed to take ontinuous values.

Hene, the formulationis:

max {

X

n

i=1

(p

i

x

i

X

n

i=1

f

i

y

i

) :

X

n

i=1

(w

i

x

i

+ s

i

y

i

) ≤ W ,

a

i

y

i

≤ x

i

≤ b

i

y

i

∀i , x

i

≥ 0 ∀i , y

i

∈ {0 , 1} ∀i .}

(12)

Here, bounds

a

i and

b

i are not neessarily integer, i.e.

a

i and

b

i

∈ IR

+

, ∀i

. Assumption

2 an be made withoutlossof generality. Indeed, if

a

i

> 0

forsome

i

, one an transform

the problem asfollows: let

a

i

= 0

,

b

i

= b

i

− a

i,

s

i

= s

i

+ w

i

a

i,

f

i

= f

i

− a

i

p

i; its solution

( x

i

, y

i

)

translates intoa solutionfor the originalproblemas follows:

x

i

= ( a

i

+ x

i

) y

i and

y

i

= y

i. Moreover, we an assume

Assumption 3 (without loss of generality)

p

i

≥ 0

for all

i

.

Indeed, if

p

i

< 0

for some

i

,

x

i

= 0

inany optimalsolution. Also, we have

Assumption 4 (without loss of generality)

f

i

≤ 0

for all

i

.

Indeed, if

f

i

≥ p

i

b

i for some

i

, it is optimal toset

x

i

= y

i

= 0

and onsider the problem

that remains on the other variables. While, if

0 < f

i

< p

i

b

i for some

i

, then, in any

optimal solution, either

x

i

= y

i

= 0

or

x

i

pfi

i

, beause a solution where

0 < x

i

<

pfi

i

an be improved by setting

x

i

= y

i

= 0

. Thus, fpi

i

an be interpreted as a lower bound,

a

i, whihan be eliminated asexplained above by re-setting

b

i

= b

i

fpi

i

,

s

i

= s

i

+ w

i fpi

i

,

f

i

= f

i

fpi

i

p

i

= 0

. Finally,one an also assume

Assumption 5 (without loss of generality)

w

i

= 1

for all

i

.

Otherwise, one an make a hange of variables

x

i

= w

i

x

i and redene the assoiated

oeients:

p

i

=

wpi

i

,

b

i

= w

i

b

i.

UnderAssumption 5,problemCKSanbereformulatedasamultiplehoieknapsak

problem. When data are integer, i.e., when

a

i

, b

i

, s

i

∈ IN ∀i

and

W ∈ IN

, observe that

the ontinuousvariables

x

takeintegervalue inany feasibleextremesolutions. Therefore,

within eah lass, one an optimize the use level

x

by enumeration. Hene, the problem an be reformulatedas a multiplehoie knapsak problem:

max{ X

i bi

X

x=ai

( p

i

x − f

i

) λ

ix

: X

i bi

X

x=ai

( w

i

x + s

i

) λ

ix

≤ W,

bi

X

x=ai

λ

ix

≤ 1 ∀i, λ

ix

∈ {0 , 1} ∀i, x} ,

(13)

(8)

where

λ

ix

= 1

i

x

i

= x

. This formulation has pseudo-polynomial size but it leads to a possiblesolutionapproahusingasolverforthemultiplehoie knapsakproblem,whih

we shall use in numerialomparison toour algorithm.

In the rest ofthis setion,we makeAssumptions 2to4withoutlossof generality,but

we arry

w

i in the notation for the sake of extending the results to modelMBKS where

Assumption 5 is not made. Similarly,when Assumption 1 is made,

f

i

= 0 ∀i

(as implied

by Assumption 4) but we keep

f

i in the formulation. Thus, our model is given by (12) where

a

i

= 0

,

p

i

≥ 0

and

f

i

≤ 0

.

1.1 Charaterizations of optimal solutions

Some properties of optimal solutions are used to develop bounding proedure or dy-

namiprograms. Toanalysethe strutureof extremesolutions,notethatif onexes

y

to

˜

y ∈ {0 , 1}

n,the problem redues toaontinuous knapsak problemthatadmits agreedy

solution.

Observation 1 (Dantzig, [3℄)

Let

I = {i : ˜ y

i

= 1}

and

W ˜ = W − P

i∈I

s

i. The resulting problem in the

x

variables is:

[

CKP(

y ˜

)

] ≡ max{ X

i∈I

p

i

x

i

: X

i∈I

w

i

x

i

≤ W , ˜ 0 ≤ x

i

≤ b

i

∀i ∈ I}

(14)

An optimal solution is obtained as follows. Assume an indexing of the items in

I

suh

that

p

1

w

1

≥ p

2

w

2

≥ . . . ≥ p

|I|

w

|I|

.

Let

c

be the index for whih

P

i<c

b

i

w

i

< W ˜

but

P

i≤c

b

i

w

i

≥ W ˜

. Then, set

x

i

= b

i for

i < c,

(15)

x

c

= W ˜ − P

i<c

w

i

b

i

w

c

,

(16)

x

i

= 0

otherwise. (17)

This standard observation yieldstotheonlusion that

x

i

∈ {0, b

i

}

for all

i

but one. The

same observation was made in [13℄ for the ase

f

i

= 0 ∀i

. Moreover, in that ase, [13℄

adds that the item with

0 < x

i

< b

i, if any, has the smallest ratio pi

wi

of non zero items.

Thispropertygeneralizestriviallytoourase. Letusexpliitlystatethisharaterization

of extreme solutionsto CKS foreasy referene.

Références

Documents relatifs

So, this study is an in-depth, narrative exploration of the cultural experiences, perceptions and identities, of these twelve, academically 'successful', British

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

Our main contribution is a multiscale approach for solving the unconstrained convex minimization problem introduced in [AHA98], and thus to solve L 2 optimal transport.. Let us

As Borsuk-Ulam theorem implies the Brouwer fixed point theorem we can say that the existence of a simple and envy-free fair division relies on the Borsuk-Ulam theorem.. This

Sparse denotes the ratio of null coefficients in the dense representation for the total degree d. For example “Sparse = 66% “ means that 66% of the coefficients are equal to zero in

In order to prove that the algorithm terminates we just have to prove that there are only a finite number of situation where we go back to step 1, step 6 and step 9.. I There is

Computational results show that our method is able to find an optimal solution of large instances within reasonable computing time and low memory occupancy.. Keywords: knapsack

running CPU time in seconds; rp: denotes the ratio y c + where y + is the capacity level where the algorithm detects that the periodicity level y ∗ is reached; vrs: number of