• Aucun résultat trouvé

Scheduling with tails and deadlines

N/A
N/A
Protected

Academic year: 2021

Partager "Scheduling with tails and deadlines"

Copied!
23
0
0

Texte intégral

(1)

HAL Id: hal-02548272

https://hal.archives-ouvertes.fr/hal-02548272

Submitted on 20 Apr 2020

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

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

Scheduling with tails and deadlines

Francis Sourd, Wim Nuijten

To cite this version:

Francis Sourd, Wim Nuijten. Scheduling with tails and deadlines. [Research Report] lip6.1999.032,

LIP6. 1999. �hal-02548272�

(2)

Fran is Sourd

LIP6,UniversitéPierreetMarieCurie,Paris

Fran is.Sourdlip6.fr

Wim Nuijten

ILOGS.A.,9ruedeVerdun,94253GentillyCedex

nuijtenilog.fr

Abstra t

Thispaperdis ussess hedulingproblemsofoperationswithtails. Whiletailsareusually

used in the literature to model due dates or deadlines, we show it may be interesting to

onsider tailsand deadlinesastwodierent things, espe ially in shopproblems. Then, we

review lassi al one ma hine and parallel ma hine problems to show whi h problems an

be still solved in polynomial time in presen e of tails and deadlines. We show that both

deadlines and tails an e iently be modeled by a minimax obje tive fun tion f

max . In

this way, several problems anbesolvedin quadrati time but, by onsidering thespe i

propertiesoftailsanddeadlinesandintrodu ing spe i datastru tures, wealsoshowthat

these problems anbe solvedin O(nlogn)time. Wealso showthat Pjp

j =1;r j jf max an besolvedinO(n 2 )time.

Keywords: s heduling, release dates, deadlines, due dates, tails, minimax obje tive fun tion,

shops heduling problem, lowerbound.

Introdu tion

Literature distinguishesdeadlinesfromdue datesbythefa tthatadeadlinemustabsolutelybe

met[Pin95℄. Hen eduedatesaregenerallyasso iatedwithoptimization riteriasu haslateness,

tardiness ornumberoflatejobswhiledeadlinesareproblem onstraints. Toourknowledge,only

little resear h eort was devoted to problems in whi h the operations have a due date and a

deadline that is they may be ompleted after their due date, but not after their deadline. In

[HP94 ℄, the minimization of the weighted number of tardy jobs on a single ma hine is studied

but this problem is NP- omplete even without deadlines. In [GPW97℄, polynomial algorithms

for some preemptive variants of this problem are given. Moreover, inthe latter problem, some

operations have a deadline while others have a due date. Thus, giving both deadlines and due

dates to operations to be s heduled appears to be an original approa h, whi h is shownin Ÿ1.3

not to bepurely theoreti al. It givespowerful propertiesfor shopproblems.

For thesake of lear notations, we are not goingto speak ofdue dates anymore. These due

(3)

problems will be spe ied bythewell-known j j -notation[GLLK79℄.

1 S heduling with tails

1.1 Notations

Inall the problems onsidered inthis paper, asetO=f1;2;;ng ofnjobsisto bes heduled

either on a single ma hine M = f1g in Se tion 2 or on a set of m parallel ma hine M =

f1;2;;mg in Se tion 3. A job (i;q i

) is dened as a pair made of an operation (or a task)

i and a tail q

i

. Ea h operation i has a pro essing time p

i

. It may also have a release date r

i

and may be preemptive or not. When the operation i ends, the job is not ompleted: some

amountofworkisne essaryto ompletethejobforexample,transportationto the ustomer.

q i

estimates the duration of this work. Hen e, e

i

denotes the end time of operation i while

C i =e i +q i

denotes the ompletion time of job (i;q

i

). When no onfusion is possible, the job

(i;q i

) will be simplydenotedbyi.

The relationship between due dates and tails is well known. Let us onsider a problem in

whi h ea h operation has no tail but a due date d

i

. Its lateness is by denition L

i = e i d i . Then, ifwe set q i = d i

, thelateness of the operationi is equal to the ompletion time of job

(i;q i

). Asa onsequen e,the problems j jL

max

and j ;q

j jC

max

areequivalent. Inthispaper,

wearegoingto introdu e adeadlined

i

for ea hoperation i. Soinorderto avoid onfusion with

due dates,we will onsideronly tailedjobs.

1.2 Criteria

In thisse tion, we showthat, whens heduling withtails, theonly usefuloptimization obje tive

is themakespan. Problems withother riteria an be redu ed to untailed problems. Therefore,

intherestofthepaper,wewill onsidertheminimizationofthemakespan,ex epttore allsome

results of omplexity.

1.2.1 Due-date-related riteria

Due dates D

j

an be introdu ed for tailed-jobs. So thelateness of a jobj isL

j =C j D j and

the maximumlateness is asusualL

max =max j2O L i . Proposition 1. j ;q j jL max and j ;q j jC max are equivalent.

Proof. We have already shown that j ;q

j jC max is equivalent to j jL max . Let us onsider a

feasible s hedule of the instan e of the problem j ;q

j jL

max

if whi h ea h job has a due date

D j

. Wenow onsider aninstan e oftheproblem j jL

max

inwhi hea h operation j isgiven a

due dateD j q j . The lateness of j is e j (D j q j ) =C j D j =L j . Therefore j ;q j jL max and j jL max

areequivalent,whi h ompletes theproof.

For the reasons given in the proof, j ;q

j j P w i T i and j ;q j j P w i U i are equivalent to j j P w i T i and j j P w i U i .

(4)

Theweightedowtimeforjobsisdenedas P i w i C i =( P i w i e i )+( P i w i q i ). Sin e P i w i q i isa onstant, j ;q j j P w i C i isequivalentto j j P w i C i

. Therefore,wedonot give anyalgorithms

forthese riteria.

1.3 The importan e of onsidering deadlines

Models with deadlines and tails an be helpful to nd properties of s heduling problems with

several ma hines (shop environment). A deadline for an operation on a ma hine may ome

fromthe problemdenitionorbydedu tionsresultingofthema hinesaturation[CP89,NtL98 ℄.

A tail an represent the duration of a series of operations (on non riti al ma hines) and/or

transportationtimes.

2

2

Figure1: Operations 1,2,3 and4 on the same resour e. 2timeunits arerequired between the

end of operations 3 and4 andthe start of 5.

For instan e, Figure1 fo useson ve operations ofa more ompli atedshopproblem. Ea h

line of the gure represents an operation. For example, the rst line refers to operation 1. Its

release date r

1

is 3, its due date d

1

is 10 and its pro essing time p

1

is 3. Moreover, we assume

thatoperations1,2,3and4aretobes heduledon asinglema hine. Finally,itisalsoassumed

thatoperation 5 must start at least2 time units after the end of operations 3 and 4. Ifwe set

q 3

=q

4

=2, operation 5 muststart aftermax (C

3 ;C 4 ). Therefore, ifwe set q 1 =q 2 = 1,the optimalsolution of 1jr j ;d j ;q j jC max

for thesetof operations f1;2;3;4g is alowerboundon the

start time of operation 5. Thereader an easily verifythattheminimummakespan(with tails)

of this problemis13. Unfortunately, 1jr j ;d j ;q j jC max is NP- omplete sin e 1jr j ;d j jC max is NP- omplete [GJ77 ℄.

For the same reason, 1jr

j ;q

j jC

max

is also NP- omplete but its preemptive relaxation an be

solved in O(nlogn) time [Car82 ℄. Assuming that the deadlines are relaxed in our example,

operations witha tail 1 an be s heduled after all theother operations and themakespan is

min(r 3 ;r 4 )+p 3 +p 4 +min(q 3 ;q 4

)=7. Thus, therelaxation ofdeadlines an leadto signi ant

loss of information. The following se tion presents two single ma hine problems with tails and

(5)

Ja kson'srule[Ja 55 ℄thats hedulesrst theoperation withthesmallestdeadline ansolve two

famous one ma hine problems with deadlines: the problem without release dates and without

preemptionsandtheproblemwithreleasedatesandwithpreemptions. Weshowthatboththese

problems an be still solved e iently inpresen e of tailedoperations. The two algorithms are

based ona transformation we rstpresent.

2.1 Expressing tails and deadlines with a minimax obje tive fun tion

Wepresentanobje tivefun tionf

max

thatmodelsboth thetail andthedeadlineofea h

opera-tioninO. Letus onsideranoperationj withatail q

j

andadeadlined

j

,wedene thefun tion

f j :R7 !R: t!f j (t)=  t+q j iftd j b otherwise

bisabig problem-dependent onstant that an be dened asmax

j2O fd j +q j g. Theobje tive fun tionf max

is thendened for any feasibles hedule asmax

j2O f j (e j ).

Obviously, an optimal solution of a s heduling problem j ;d

j ;q j jC max is also an optimal

solution of the problem j jf

max . Conversely, j ;d j ;q j jC max

has no feasible solution if and

onlyiftheoptimumof j jf

max isb.

2.2 Non-preemptive problem with pre eden e relations

Lawler developed a simple algorithm to solve in O(n

2

) timethe problem 1jpre jf

max

when the

fun tionsf

j

are non-de reasing[Law73℄. These onditions are learly satised by thefun tions

denedinŸ2.1. Sin ethefun tionsarenon-de reasingand thereisnorelease date,thereexists

an optimal solution without idle time. In Lawler's algorithm, the sequen e of operations is

onstru tedinreverse order. Theend timeofthes heduleis learly t=

P

j p

j

( fFigure2). At

ea h stepofthe algorithm, the uns heduled operation i

? thatminimizesf i (t)is s heduled between dates t p i ? and tisset to t p i ?.

Thisis repeateduntil tbe omes0.

Figure 2 shows how f

1 , f 2 , f 3 and f 4

an be dened to s hedule without preemption (and

without r

j

) the four jobs dened in Figure 1. The latest end time of operations is e

max = P 4 j=1 p j

= 11, the makespan is max

1j4 f j (e j ) = e 3 +q 3

= 13. We an noti e that the

produ ed s heduledoesnot satisfyreleasedate onstraints.

Ifwe onsider the problemwithout pre eden e onstraints, we an usetheproperties ofour

f j

fun tions toimprove the omplexityof theproblem:

Theorem 2. 1jd j ;q j jC max

an be solved in O(nlogn) time.

Proof. Weintrodu eaheapAtostoretheoperationsavailableatdatetandtondtheoperation

withthesmallest tail.

t P i2O p i A ; whilet>0do

for ea hk62Asu hthat d

k

(6)

16

14

12

10

8

6

4

2

1

2

3

4

5

6

7

8

9 10 11 12 13 14 15 16 17 18 19 20

3

2

1

4

i t h 3 =h 4 h 1 h 2 Figure2: f 1 ,f 2 ,f 3 ,f 4

(7)

leti betheoperationwiththesmallesttailinA A A fi ? g i ? s heduledbetweent p i ? andt t t p i ? end

Ea hoperationkisinsertedonlyon eintoAandisalsodeletedexa tlyon e. Bothoperations

require O(logn) time sothatthe time omplexityofthis algorithm isO(nlogn).

This algorithm an be adapted in presen e of a pre eden e graph G(O;E). At ea h step,

theoperation k mustbe inserted into A only ifall its su essors are s heduled. Be auseof the

veri ation,the overall omplexityofthe algorithmisO((n+jEj)logn). Moreover,ifweassume

thatthefun tions f

i

are ontinuous andif there arefew interse tions between them,it maybe

interesting tomaintaindynami allythesortedlistofthevaluesf

1 (t);f 2 (t); ;f n (t), whi h an

bedonewithusualte hniquesof omputationalgeometry. Hen e,the omplexityof1jpre jf

max

isO((n+jEj+a)logn) where aisthenumberof interse tions between the f

i

fun tions.

2.3 The preemptive problem with release dates

Inmost s heduling problems,release dates annotbe relaxed. Therefore,weare now interested

inthepreemptive problemwithrelease dates,tailsand deadlines. Werstpresent analgorithm

dueto[BLLK83℄thatsolves1jprmp;pre ;r

j jf

max

inO(n

2

)time. Itwillbe alledbllrk inthis

paper. ThetransformationinŸ2.1 analsobeusedtosolveourproblemwithtailsanddeadlines

butweshow thattheproblem1jprmp;r

j ;d j ;q j jC max

issolved inO(nlogn)time.

The exe ution of the algorithm of bllrk for an instan e of 6 operations is illustrated in

Figure 3. This algorithm rst s hedules, without preemptions, the operations in the order of

their release dates r

i

(step 1). This s hedule, that we will all the blo k s hedule, onsists of

dierent blo ks of operations (a blo k is a maximum set of operations s heduled onse utively

withoutidletime). Thenextstepofthealgorithmreorganizestheexe utionofoperationswithin

ea hblo k(withpreemptionallowed). Assumingthattwoblo ksareidenti alifandonlyifthey

have identi alstart timeandend timeand ontain thesame operations, thefollowing lemma is

satised:

Lemma 3 ([BLLK83 ℄). There existsan optimalsolutionof1jprmp;pre ;r

j jf

max

whose blo ks

are identi al to the blo ks of the blo k-s hedule.

Ea h blo kB oftheblo k-s hedule isrearrangedasfollows:

- iftheblo k ontains only one operation, itis notrearranged;

- let s and t be respe tively the start and end time of B and let i

?

be an operation in B,

withno su essor inB,thatminimizes f

i (t).

 usea re ursive allto nd anoptimaol s heduleS

i ?

for theinstan erestri tedto the

operations inBnfi

? g;

 s hedulei

?

within theidle periods ofS

i ?.

(8)

r i 0 1 5 6 15 17 p i 6 2 3 2 3 1 d i 16 17 11 11 25 23 q i 8 10 7 12 1 2

4

3

2

0

8

11

13

15

18

19

4

5

8

10

8

4

2

2

3

3

5

10

1

1

1

3

3

3

6

6

19

3

3

3

1

1

1

10

13

5

1

0

3

6

8

4

2

3

3

1

1

1

10

13

5

1

0

3

6

8

4

2

18

3

3

1

1

1

10

13

5

1

0

3

6

8

4

2

15

18

8

4

2

(1)

(2)

(3)

(4)

(5)

(6)

(7)

1

5

5

6

6

6

5

6

17

17

Figure3: Anexe ution of bllrk

(9)

and, for ea h blo k B (with n B

operations), the operation i

?

is s heduled in O(n

B

) time on e

the idle intervals are omputed by there ursive all. As a onsequen e, thetime omplexity of

thealgorithm isO(n

2

). It isalso easyto prove thatthesolutionfound bythisalgorithm hasat

most n 1 preemptions. The optimality of the algorithm isproved by observing that for ea h

blo k that ends at date t, f

i ?(t)

is a lower bound for the minimum f

max

. In the re urren e,

onlysub-problemsofthe initialproblemare onsideredsothatallthef

i

?(t)values omputedat

ea hsteparelowerbounds. Sin ethe onstru teds heduleisfeasible,themaximumf

i ?(t)

value

foundduring the algorithm istheoptimal solutionvalue.

Exploiting the spe ial properties of the f

i

fun tions and using more elaborated stru tures,

we reated an algorithm  alledsn that improvesthe omplexityof theproblemwithtails

and deadlines.

Theorem 4. The algorithmsn solves 1jprmp;r

j ;d j ;q j jC max

in O(nlogn) time.

The des ription of sn requires additional notations that we introdu e by illustrating its

exe ution on one instan e(Figure 4). Firstof all,we assumewithout lossofgeneralitythatthe

operationsaresortedinnon-de reasingorderoftheirreleasedates. Hen e,ijimpliesr

i

r

j .

Iftwooperationsiandjares heduledinthesame blo kB oftheblo ks hedule,anyoperation

k su h thatik <j is in B. For example,in Figure 3-(1), thetwo blo ks are f1;2;3;4g and

f5;6g. In the same wayasbllrk ,theblo ks of thes hedule provided by sn will be thesame

asthe blo ks oftheblo ks hedule.

Theblo ksofthe blo ks hedulearereorganizedsu essivelyinreverseorderandthe

opera-tions inea h blo karealsos heduled inreverse order. Figure4 showshowtheblo kf1;2;3;4g

(see Figure 3) iss heduled bysn . The blo kf5;6g isassumed to have already been s heduled

bysn . LetS be the blo k s hedule ofthe uns heduled operations and let T be theend time

of S . NotethatS mayviolatethedeadlines onstraints. Intheexample,Fig.3(1)represents

S ,T =13andoperation4endsafteritsdeadlined

4

=11. p

+ i

isthepro essedtimeofiafterT

 ie thepart of ithathasalready been s heduled  and p

i =p i p + i

denotes thepro essing

timeofibeforeT iethepartofithathasnotbeens heduledyet. Letf betheoperationwith

the greatestreleasedatesu hthatr

f + P if p i

=T. Su haf existssin etherstoperationof

the lastblo kofS satisesthisequality. Obviously,alltheuns heduledpartsoftheoperations

if mustbes heduledbetween r

f

andT andnootheroperation an bes heduled inthistime

interval. The set of operations B

f

= fi  fjp

i

> 0g will be alled the urrent blo k. In the

example, at T =13, f =1 and the urrent blo k is f1;2;3;4g. Then sn sele ts theoperation

i ?

2 B

f

with the smallest tail among the available operations A = fijr

i <T  d i g = 1;2 . It nds i ?

=1. Finally,the algorithm determines whi h length of i

?

mustbe s heduled. We an

indeed noti ethatif4timeunits ofoperation1 ares heduled intimeinterval[9;13℄, operations

3 and 4 annot be s heduled any more. In order to avoid to rea h su h a deadlo k, we will

introdu e for ea h operation j 2B

f the value  fj =r f + P fk<j p k r j

,whi h is the

dier-en e between the start time of j inS and its release date. In Fig. 4-(2), we an observe that

ea h time one time unit of i

?

is s heduled, the 

fj

-values are de reased by one for all j >i

? .

Therefore, inFig.4-(3),on e3 timeunits of operation 1 ares heduled, 

13 =0. Itmeans that r 1 +p 1 +p 2 =r 3 and r 3 +p 3 +p 4

(10)

3

4

1

3

4

6

1

2

(2)

(1)

(3)

1

3

4

2

1

1

1

2

1

3

4

1

2

(4)

T =12 p 2 =2 p 3 =3 p 4 =2 p 1 =5 p + 1 =1 p + 4 =0 p + 3 =0 p + 2 =0 12=4 13=2 r 3 12=5 13=3 T =13= 4 i=1 p i p 2 =2 p 3 =3 p 4 =2 p 1 =6 p + 1 =0 p + 4 =0 p + 3 =0 p + 2 =0  14 =4  14 =5 0 10 13 0 5 7 10 12 13 13 11 8 6 5 1 0 p 3 =3 p 4 =2 p + 4 =0 p + 3 =0 T =10 p 2 =2 p 3 =3 p 4 =2 p 1 =3 p + 1 =3 p + 4 =0 p + 3 =0 p + 2 =0 T =10 r 3 13 10 0

(11)

jobof the urrent blo kwhi h hasthesmallesttail untilone of thetwo eventsismet:

1. theoperationis ompletelys heduled;

2. one of the 

fj

be omes 0.

We now give a more formaldes ription of sn . As in thealgorithm for the f

max

obje tive

fun tion,theblo ks heduleisrst onstru ted. Thenthepro edures hedule_blo kis alledfor

ea hblo kB oftheblo ks heduleinde reasingorderoftheirstart time. f istheoperationwith

thesmallest releasedateintheblo k(B=B

f

). Theend timeT ofB isequal tor

f + P i2B p i . pro edures hedule_blo k(f;T) begin ifT >r f then begin

for ea hk62Aandd

k T doA A[fkg Q(f;A) fiji2Aandr f r i g

ifQ(f;A)isemptythenthereisnofeasibles heduleelse

leti ?

beanoperationofQ(f;A)withaminimumtail

letj ?

beanoperationthatminimizesf

fj jp j >0andr i ? <r j g t max  T p i ?;T  fj ? leti ?

betheoperations heduledintimeinterval[t;T[

de rease(i ? ;T t) asetof T p i ? : A A fi ? g s hedule_blo k(f;t) T  fj ? : s hedule_blo k(j ? ;t) s hedule_blo k(f;r j ?) end endif end

Thepro edure de rease(i;Æ) will be des ribed later. It de reases thepro essing timeof ibyÆ

(ie: p i

p i

Æ). Then itupdatesthedata stru ture to al ulate thevalues 

ij .

The omplete proof of the validity and of the time omplexity of Theorem 4 is quite long

be ause it requires the introdu tion of spe i data stru tures. For this reason, it is given in

appendix at the end ofthe paper. Here weonly present asket h ofthis proof.

Theproofofvalidityisbaseduponthefa tthats hedule_blo kprovidesafeasibles hedule

whose makespan isa lower bound for the problem. The onstru ted s hedule isshownto have

at most n 1 preemptions. Two data stru tures are then presented to ompute i

?

and j

? in

O(logn)time. Boththese stru turesarealso updatedinO(logn) time. That eventually proves

thats hedule_blo k solvestheprobleminO(nlogn)time.

We annotusethetraditionalheapdatastru turetondi

?

andj

?

be auseoftheadditional

onstraintsr f r i  and r i ? <r j . Moreoverthe  fj

-valuesarenot onstant.

At last, one an observe that sn doesnot always produ e the same s hedule than bllrk .

(12)

i i i i

1 0 3 1 1

2 2 3 1 4

3 0 4 2 2

yieldtwo dierent s hedules withmakespan7.

2.4 Preemptive or non-preemptive relaxation

2

0

6

9

11

3

1

4

3

Figure5: An optimal s hedulefor the non-preemptive problemwithrelease dates.

ThepolynomialalgorithmspresentedinŸ2.2andŸ2.3oertwo meansfor al ulatingalower

boundfor the earlieststart time ofoperation 5inFigure1. First,we an relaxtherelease dates

by settingr

3

and r

4

to 0 inorder to deal with an instan e of 1jd

j ;q j jC max . Otherwise, we an

onsiderthepreemptiverelaxationwhi hleads toaninstan eof1jprmp;r

j ;d j ;q j jC max . We an

remarkthatthe optimal makespan for both these problemis13. 13 isalso themakespan ofthe

orrespondinginstan eof 1jr j ;d j ;q j jC max asshownby Figure5.

Whatisthe bestrelaxationto hoose? Itisnotdi ulttoseethatwhenallreleasedatesare

equal,theblo k-s heduleofoperationsinB fi

?

ginŸ2.3hasonlyoneblo k. Asa onsequen e,

i ?

is notpreemptedand the onstru ted s hedule hasno preemptions. So,we an on lude that

thealgorithm presentedinŸ2.3alwaysnds a greater makespan andthenshould be preferedto

updatetheearlieststart times.

2.5 Flow-time and deadlines

It iswell knownthat1jprmp;r

j j

P C

j

ispolynomial[Bak74℄butthis problembe omesNP-hard

assoonasdeadlines areadded [DL93 ℄.

3 Parallel ma hine problems

IntheexamplepresentedinFigure1,thefouroperationsaretobes heduledonasinglema hine.

However, the pro ess presented in Ÿ1.3 is still valid when the prede essors of the operation

whose earliest start time must be updated are to be s heduled on parallel ma hines. Hen e,

in this se tion, the jobs (i;q

i

) are to be s heduled on a ma hine among a set of m ma hines

M=f1;2; ;mg. Aswe didfor single ma hineproblems, we will spe i allybe interested in

problems withdeadlines.

Theobje tive fun tionf

max

isstill very usefulto model both tailsand deadlines sothatwe

(13)

q 1 q2 q 1 q2 q 1 q2 q 1 q2 q 1 q2 q 1 q2 q 1 q2 1 2 3 4 5 6 7 8 C : C q 2 <r 1 <C q 1 <r 2 <d 2 <d 1 C q 2 <r 1 <r 2 <C q 1 <d 2 <d 1 r 1 <C q 2 <r 2 <C q 1 <d 2 <d 1 r 1 <r 2 <C q 2 <C q 1 <d 2 <d 1 r 1 <r 2 <C q 2 <d 2 <C q 1 <d 1 r 1 <r 2 <C q 2 <d 2 <d 1 <C q 1 r 1 <r 2 <d 2 <C q 2 <d 1 <C q 1 r 1 <r 2 <d 2 <d 1 <C q 2 <C q 1 C q 2 <C q 1 <r 1 <r 2 <d 2 <d 1 R[D: q 1 q 2

Figure6: R, D,Q andC in theproof ofProposition 6

3.1 Unlimited number of ma hines

Sin e it is NP- omplete when m = 1, the non-preemptive s heduling problem of tasks with

releasedatesanddeadlinesonparallel ma hinesisNP- omplete. Hen e,wewillbeinterestedin

dierentrelaxationsofthisproblem. A ommonideawhenfa ingaparallelma hineenvironment

isto relaxthe limitation on the numberofma hines. We havethenthe(obvious) result:

Proposition 5. The problem P1jpre ;r

j jf

max

an be solved by the riti al path method.

Inshopproblems,itiswellknownthat ifoperation ipre edesoperation jthenr

j r i +p i .

TheseearlieststarttimesareusuallyupdatedwithFord-Bellman'salgorithm,whi hisequivalent

to the riti al path method. Asa onsequen e, if we want to updatethe earlieststart times of

an operation oby the pro ess presentedin Ÿ1.3, the apa ity onstraint on thesize of M must

notbe relaxed.

3.2 Preemptive relaxation on unrelated ma hines

Instead of relaxing the apa ity onstraint, we an relax the non-preemption assumption. We

have thena polynomial problemeven whenthe parallelma hines areunrelated:

Proposition 6. The optimal solutionof R jprmp;r

j ;d j ;q j jC max an be omputed in polynomial time.

(14)

j j max j

If we suppose that the set R[D[Q is totally ordered, that is R[D[Q =ft

1 ;t 2 ; ;t 3n g with t 1 t 2 t 3n

, we an usethelinear formulation for R jprmp;r

j ;d j jC max of [LL78℄to

ompute thevariablest

(k) ij andC max where t (k) ij

is thepro essing timeof operation ionma hine

j within the interval [t

k ;t

k+1

℄. In other words, our problem an be solved in polynomial time

on ewe knowthetotal orderonR[D[Q. Wearegoingto showthatthereareatmost O(n

2 )

possible total orders onthis set(see alsoFigure 6).

Firstofall,weknowthatthesets R[DandQ arebothtotallyordered. Letus onsiderthe

setC=fCjC =t+q;C max q2Q;t2R[Dg. So jCjjQjjR[Dj2O(n 2 ) Let C = f 1 ; 2 ;:::; jCj g with 1  2   jCj . Let 0 = 1 and jCj+1 = +1. For any k jCj, the ondition k C max  k+1

implies that the set R[D[Q is totally ordered. In

onsequen e,wehaveatmost jCj+2possibletotalorders onR[D[Q. Usingbinarysear hon

thevaluesinC,theminimumC

max

whi hgivesafeasibles hedule an thenbefoundbysolving

atmost O(logn) linearprograms.

This result is more a theoreti al omplexity result than a usable algorithm to solve the

problem. In parti ular, it may not be used for deriving lower bounds for a shop problem in a

bran h and bound s heme. To our knowledge, there is no fastalgorithm to solve this problem,

eveniftheparallelma hinesareidenti aloruniformQjprmp;r

i ;d

i

j anbesolvedinO(mn

3 )

timebyredu tionto a networkowproblemyet[FG86 ℄. For thisreason,it maybe ofpra ti al

interest to nd fast algorithms to ompute lower bounds for these problems as [CP98 ℄ did for

the problemwithoutdeadlines Pjprmp;r

i ;q i jC max .

However,spe ial asesofthes hedulingproblemwithtailsanddeadlinesonparallelma hines

an be e iently solved. In parti ular, the next se tion onsiders that all the operations have

unitpro essingtime (p

i

=1).

3.3 Unit Exe ution Time (UET) operations

We will on e more onsider the obje tive fun tion f

max

dened in Ÿ2.1 that an model both

tails and deadlines. [GLLK79℄have shown that Qjp

i = 1jf max an be solved inO(n 2 ) time by

adapting Lawler's algorithm (Ÿ2.2). Let s

j

be the speed of ma hine j and let us onsider the

time intervals I(k;j) =[k=s

j

;(k+1)=s

j

℄for anyk 2N andanyj2M. I(k;j) will ontainthe

k th

operation s heduledon ma hine j. Obviously,there existsan optimal s hedule ontained in

the nintervals I(k;j) withthe nsmallest end times (k+1)=s

j

. As for Lawler's algorithm, the

n operations are ae ted to these n intervals in reversed order: at ea h step, thefree interval

I(k;j) withthe greatest end time (k+1)=s

j

is allo ated to the non-assigned operation i

? that minimizes f i ((k+1)=s j ).

In presen e of release dates, theproblem be omes more di ult be ause all the operations

annot be s heduled inthe nrsttime intervals. However, a variant ofthealgorithm presented

inŸ2.3 solvesthe problem withidenti alma hines Pjp

j =1;r j jf max .

(15)

r i 1 3 3 3 3 3 4 4 5 6 6 6 7

1

2

3

4

5

8

10

13

6

7

9

11

12

t

0

1

2

3

4

5

6

7

8

9

10

1

2

3

Figure7: Blo k-s hedule of13 UET operations on3 ma hines

order,that isthe su essor of I(k;j) is:



I(k;j+1) ifj6=m

I(k+1;1) ifj=m

ForanyslotI,thereexisttwo integersk andjsu hthatI =I(k;j). k andjarerespe tively

the date and the ma hine of slot I. The n operations are assumed to be sorted in the order

of their release dates. The following algorithm onstru ts a feasible (non optimal) s hedule to

reate blo ks of operations, that will play the same role as the blo k-s hedule in Ÿ2.3. In this

parallelma hineproblem, a blo k isdened asa maximum setof operations s heduled without

idletimein onse utive slots.

pro edure reate_blo ks(f1;;ng) begin I I( 1;1) b 0 for i 1tondo begin ifr i >dateofI thenI I(r i ;1) b b+1 B b ; B b B b [fig I su essorofI end end

The s hedule produ ed by reate_blo ks is the blo k s hedule. Ea h blo k B

b

is a set of

operations to whi h we an asso iate a start slot and an end slot: ea h operation in B

b is

s heduled inone slot that is between the start slot and the end slot. Figure 7 presentsa blo k

s hedule of 13 UET operations on 3 ma hines. This s hedule has three blo ks. The rst blo k

asonlyone operationf1g. Itsstartandend slotsareI(1;1). The se ondblo kf2;;9g starts

at I(3;1) and ends at I(5;2). The last blo k f10; ;13g starts at I(6;1) and ends at I(7;1).

Inwhat follows, two blo ks will be stated asidenti al ifthey ountain thesame operations and

(16)

j j max

tothe blo ks of the blo k-s hedule.

Proof. For an instan e of Pjp

j = 1;r

j jf

max

, let us onsider an optimal s hedule S

opt

and the

blo ks heduleS

blo k

andassumethatthereexistsaslotthatisidleinones heduleandassigned

in the other. Let I be the rst of these slots. Sin e no operation is delayed by reate_blo k,

I is ne essaryidle in S

opt

and assigned in S

blo k

. Let t be the date of I. If all the operations

s heduledafter I inS

opt

have arelease dategreater than t, theoperation j assignedto theslot

I intheblo ks hedule would also have a releasedate greater than t (from thedenition ofI),

whi h is a ontradi tion. Therefore, there exists an operation i in S

opt

s heduled after I with

r i

 t. Job i an be moved into idle slot I and the new s hedule is also optimal be ause f

i

is non-de reasing. Iterating this pro ess, an optimal s hedule with thesame blo ks asS

blo k is

found.

We an buildan optimals heduleof aset S of UEToperationsbythefollowing pro edure:

 ifS hasonlyone operation, s hedulethis operation at itsrelease date

 otherwise,letB

b

betheblo k(s) omputedbythe alltothepro edure reate_blo ks(S).

For ea h blo kB

b :

 let t

b

thedate oftheend slot ofB

b  let i ? 2B b thatminimizes f i (t b +1)

 solvebyare ursive all thesub-problem withoperations inB

b fi ? g  s hedule i ?

inthe idle slot

Theproofofthis algorithmisidenti altotheproofofthealgorithm inŸ2.3. We havenallythe

property: Proposition 8. Pjp i =1;r i jf max an be solved in O(n 2 ) time.

Theproof ofTheorem4 an easilybeadaptedtoshowthattheproblemPjp

i =1;r i ;d i ;q i jC max

an be solvedinO(nlogn) time.

Con lusion

In this paper, we have dis ussed s heduling problems whose operations have both tails and

deadlines. Wehavepresentedseveral problemsonsingleor parallelma hinesthat an besolved

in polynomial time. We have shown that the obje tive fun tion f

max

an model both tails

and deadlines but the omplexity of the problems an be improved when we onsider spe i

properties of the tailsand deadlines. Moreover,we have shown Pjp

i =1;r i jf max , an besolved inquadrati time.

We plan to investigate further how to make the best use of the lower bounds presented in

(17)

previousversionsof this paper. Thework ofthe rstauthoris partially nan edbyILOG S.A.,under

resear h ontra tILOG/UPCMno. 980220.

A Proof of Theorem 4

First of all, we re all the denition of 

fj = r f + P fk<j p k r j

where we assume that the

operations are sorted in the non de reasing order of their release dates. Obviously, 

fj =  fi + ij

for any i su h that f  i  j. If f is the rst operation of a blo k B of a blo k

s hedule,for anyj2B,

fj

0. Conversely,letus onsiderasetBofoperationsand letf 2B

be an operation withthesmallest release date. If, for any j2B,

fj

0then itis easy to see

that theblo k s hedule has only one blo kthat starts at r

f and ends at r f + P k2B p k . From

Lemma3, thereis alsoan optimals heduleof Bin luded inthis timeinterval.

We are now going to prove that, for any blo k B of the blo k s hedule, s hedule_blo k

returnsanoptimal s hedule ofthe operationsinB.

A.1 Proof of orre tness

Let us onsider a blo k B of the blo k s hedule. Ea h operation i of B has a pro essing time

p i = p i and ` = P i2B p i

is the length of B. If B has only one operation f, this operation is

s heduledwithno preemption at itsrelease date: this s hedule isoptimal.

We now onsider thatB hasmore than one operation. Let f bean operationof B withthe

smallestreleasedateandletT =r

f

+`betheendtimeofB. Letusassumethat,forallblo ksof

length`<L,s hedule_blo k(f;T)produ esan optimals hedule in luded inthetimeinterval

[r f

;T℄ and let us onsider a blo k B of length ` =L. In what follows, t and i

?

are the values

denedin thedes ription ofs hedule_blo k.

- Ift6=T: s hedule_blo ks hedulestheoperationi

?

betweentandT. Fromthedenition

of i ?

,T+q

i

? is a lowerboundfor the makespan ofthe s heduleof B. Let us onsiderthe

set ofoperationsB

0

that ontains thesame operations thatBwithpro essing times

p 0 i =  p i ifi6=i ? p i ? (T t) ifi=i ?

For any feasible s hedule of B, we an build a feasible s hedule of B

0

by repla ing T t

slots in whi h i

?

is s heduled by idle time. So the optimal makespan for B

0

is less than

the optimal makespan for B. Let us dene, for any j 2B

0 ,  0 fj = r f + P fk<j p 0 k r j .

From this denition, if j  i

? ,  0 fj =  fj  0. If j > i ? ,  0 fj =  fj (T t). Sin e T t   fj ?   fj ,  0 fj

 0. So, the optimal s hedule of B

0 an be in luded in time interval [r f ;t℄. Sin e t r f

< L, s hedule_blo k nds an optimal s hedule of B

0 and

nally the produ ed s heduleis optimal.

- ift=T: sin e p i ? >0,we ne essarilyhave  fj ?=0for some j ? 2B. Clearly, r f <r j ? < T. Let us dene, B 1 =fi2 Bjr i <r j ?g and B 2 =fi2 Bjr i r j ?g. B 1 and B 2 make a

(18)

partition of B. Fromthedenition of fj : r f + X i2B1 p i = r j ? r j ? + X i2B 2 p i = T

Inanyoptimals heduleofBin ludedinthetimeinterval[r

f

;T℄,alltheoperationsthatare

inB

2

mustbes heduled in[r

j ?;

T℄. Therefore, alltheoperations inB

1 mustbes heduled in[r f ;r j ?℄.

Sin e Bforms a blo k,

fj

0 for all j2B. So for any j2B

1 ,fj0 and for anyj 2B 2 , j ? j = fj ?+ j ? j = fj

0. Therefore theoperationsin B

1

and inB

2

form ea h oneblo k. Themakespanofea hof thesetwoblo ks isof oursea lowerbound

of themakespanof the s hedule of B. Sin er

j ? r f <Land T r j ? <L ,theprodu ed s hedule is optimal.

To on lude, s hedule_blo k produ es an optimals hedule for 1jprmp;r

j ;d j ;q j jC max .

A.2 Number of preemptions

Lemma 9. A blo k B s heduled by s hedule_blo k has at mostjBj 1 preemptions.

Proof. ThislemmaisobviousifBhasonlyoneoperation. Letussupposethelemmaisvalidfor

allBsu hthatjBj<N andletus onsiderablo kBsu hthatjBj=N. Whens hedule_blo k

is alled: - if t = T p i ? , i ?

is s heduled without premption. Then the blo k B fi

?

g is s heduled

betweenr

f

andtwithatmost(N 1) 1preemptions. Sothes hedulehasat mostN 2

preemptions (and of ourse at most N 1preemptions).

- if t = T 

fj ?,

only a part of i

?

is s heduled, whi h auses one preemption. Then two

non-empty sub-blo kB 1 andB 2 ares heduled. jB 1 j<N andjB 2 j<N sothe onstru ted

s hedulehasat most 1+(jB

1

j 1)+(jB

2

j 1)=jBj 1preemptions.

This resultshows that, when s heduling a blo k B, s hedule_blo k is alledO(jBj)times.

Wearenowgoingto showthatea h instru tionof s hedule_blo k anbeexe utedinO(logn)

time,whi h willshow thatea h blo kB is s heduledinO(jBjlogn)time.

A.3 Data stru tures

Wepresent inŸA.3 twodatastrutures for maintaining minimumelementsindynami sets:

- i ?

isanoperationthat minimizes fq

i

ji2Aand f <ig

- j ?

isan operationthat minimizes f

fj jj 2B f and i ? <jg

(19)

[1,8)

[1,5)

[5,8)

[1,3)

[3,5)

[5,7)

[7,8)

[3,4)

[6,7)

[1,2)

[2,3)

[4,5)

[5,6)

Figure 8: Thebinarytree T for a setof 7operations

Both these stru tures are based upon the same basi stru ture, a binary tree T, whi h is

represented in Figure 8 for n = 7. This binary tree divides the set of operations into subsets

denedasfollows. Ea hnode isdenotedbyapairofintegers[l;r)whi hmeansthatthesubtree

ofroot [l;r) oversthe operations fl;l+1;;r 1g. Inthis way,theroot of T isdenoted by

[1;n+1) and the leaf orresponding to the only operation iis [i;i+1). The left resp. right

des endant ofnode[l;r) is[l;m)resp. [m;r) where m=d

l +r 2

e. T isabinarytreewith

nleavessoit hasat most2n 1 nodes.

We nowpresent howto use T to queryfor i

?

and j

?

. It isimportant to remember thatthe

n operations arenumberedinthe orderof theirrelease dates.

A.3.1 Available operations

Atea h allofthere ursivepro edures hedule_blo k,theavailableoperationwiththeshortest

tail is sear hed for (i ?

). We annot use a heap stru ture to store A be ause of the additional

onstraint that is the operation must be in the urrent blo k (i

?

 f). It is also fruitless to

reate aheap for ea h blo kbe ausesub-blo ks are reated during thealgorithm exe ution. So

wepresent an originaldatastru ture basedon T with thefollowing properties:

- an operation an be insertedor removed inlog (n)time;

- i ?

anbe determined inlog(n)time.

Atea hnode[l;r)ofT,weasso iateanoperation[l;r)thatminimizesfq

i

ji2Aand li<rg.

If this setisempty,[l;r)=0. Bysetting q 0

=+1,we have thesimplerelation:

q [l ;r) =min q [l ;m) ;q [m;r)  (1)

The [l;r)-values are initialized after that the blo k s hedule (that ompletes at time T) is

omputed. The values of then leaves are [i;i+1) =iif d

i

>T and [i;i+1) =0 otherwise.

The O(n)inner nodesare initialized intopologi al orderwith(1). So,the initialization pro ess

is done inlinear time. The datastru ture also implements two update pro edures to insert an

operationinto A andto remove itfrom A. Theyareboth basedon (1):

(20)

if l=r 1then [i;i+1) i else m d l+r 2 e

ifi<mthenadd((l;m);i)elseadd((m;r);i)

ifq [l;m) q [m;r) then[l;r) [l;m)else[l;r) [m;r) endif end

pro edureremove((l;r);i) ;; A A fig

begin if l=r 1then [i;i+1) 0 else m d l+r 2 e

ifi<mthenremove((l;m);i)elseremove((m;r);i)

ifq [l;m) q [m;r) then[l;r) [l;m)else[l;r) [m;r) endif end

add and remove are based on a di hotomi sear h. Their time omplexity is learly O(logn).

Thedatastru ture T mustbeableto ndanoperationi

?

thatminimizes fq

i

ji2A andf ig

inO(logn)time. We an easilyverify thatthefollowing fun tion performsthis task:

fun tioni_star((l;r);f) begin if l=r 1thenreturn [l;r) else m d l+r 2 e iff <mtheni i_star((l;m);f) returni 0

2fi;[m;r)gsu hthatq i 0 =min q i ;q [m;r) 

else returni_star((m;r);f)

endif end A.3.2 Minimum  fj In order to nd j ?

, we dene, for any pair (;) of integers su h that 1   <   n+1,

[;) = P j< p j and [;) = min k< ( [;k) r k

). With these denitions, we have

 fj ? =r f +min j>i ? ( fj r j ) =r f +;i ? )+[i ?

;n+1). Thesevalues ;r) and [l;r) are

asso iated at ea hnode [l;r). We have thentheimmediate re urren e relations:

;r) = ;m)+;r) (2)

[l;r) = min( (l;m);;m)+(m;r) ) (3)

(21)

i

an be maintained in O(logn) time, asshown by this omplete formulation of de rease(i;Æ),

alsobasedon equations 2and 3:

pro edurede rease(i;Æ) begin p i p i Æ de rease_re ((1;N+1);i;Æ) end pro edurede rease_re ((l;r);i;Æ) begin ;r) ;r) Æ if l=r 1then if;r)=0then[l;r) 1 else [l;r) [l;r) Æ else m d l+r 2 e ifi<mthende rease_re ((l;m);i;Æ) else de rease_re ((m;r);i;Æ) [l;r) min([l;m);;m)+[m;r)) endif end Sin e  fj ? = r f +;i ? )+[i ?

;n+1), we need two fun tions able to al ulate for any i in

the urrent blo kthe values ;i) and[i;n+1). The;i

?

)-value doesnot depend ofj

? . j

?

isthe operation that minimizes the se ondterm [i

?

;n+1). This value doesnot depend of f.

Thisde omposition isthebase ofthe queryfun tions.

Sin e ;i) = ) ), we only present a fun tion to ompute ) in O(logn)

time: fun tionsigma((l;r);i) begin m d l+r 2 e if m=rthen return;r) else

ifi<mthenreturnsigma((l;m);i)

else return;m)+sigma((m;r);i)

endif

end

Thefun tion to al ulate [i;n+1) =mu((1;n+1);i) is quitesimilar. In order to shorten the

algorithmdes ription,wedonotmentionexpli itelyhowj

?

shouldbereturnedatthesametime

as[i;n+1). fun tionmu((l;r);i) begin m d l+r 2 e if m=lthen

(22)

else

ifi<mthenreturnmin(mu((l;m);i);;m)+[m;r))

else return;m)+mu((m;r);i)

endif

end

Therefore,we have shownthe following lemma.

Lemma 10. At ea h all of s hedule_blo k_re , the tree data stru ture T to whi h are

asso- iated the values [l;r), ;r) and[l;r):

- is maintained in O(log(n)) time;

- nds i ? andq i ? in O(logn) time; - nds j ? and fj ? in O(log (n)) time.

Moreover, the data stru ture an be initialized in linear time.

A.4 Complexity of the algorithm

We nish the proof of Theorem 4 by the analysis of the omplexity of s hedule_blo k. Ea h

operationisaddedonlyon etoAsothattheglobal omplexityofalltheexe utionofA A[fkg

isO(nlogn). From Lemma 10, itis lear that all the other operations in s hedule_blo k are

s heduledinO(logn)time. Foranyvalueofi

? orj ? ,ea heventt=T p i ? andt=T  fj ?

an happen at most on e: after the event t = T p

i ?,

i ?

is ompletely s heduled and not

available anymore and after theevent t=T 

fj ?,

j ?

be omesthe rst operation of a new

urrent blo kB

j ?

thatis immediatelys heduled.

Finally,this provesthat 1jprmp;r

i ;d i ;q i jC max

an be solved inO(nlogn) time.

Referen es

[Bak74℄ K.R.Baker, Introdu tion to sequen ing ands heduling, Wiley&Sons, 1974.

[BLLK83℄ K.R.Baker,E.L.Lawler,J.K.Lenstra,andA.H.G.RinnooyKan,Preemptive

s hedul-ingofa singlema hinetominimizemaximum ost subje t torelease datesand

pre e-den e onstraints, Operations Resear h26 (1983), 111120.

[Car82℄ J. Carlier, One ma hine problem, European Journal of Operational Resear h 11

(1982),4247.

[CP89℄ J.CarlierandE.Pinson,Analgorithmforsolving thejob-shopproblem,Management

S ien e 35(1989),no.2,164176.

[CP98℄ J.CarlierandE.Pinson,Ja kson'spseudo-preemptive s hedule forthePmjr

i ;q

i jC

(23)

onstraints,Journal of Algorithms14(1993), 4568.

[FG86℄ A. Federgruen and G. Groenevelt, Preemptive s heduling of uniform ma hines by

ordinarynetwork ow te hniques, Management S ien e 32(1986), 341349.

[GJ77℄ M.R.Garey and D.S. Johnson, Two-pro essor s heduling with starttimes and

dead-lines,SIAM Journalon Computation6 (1977), 416426.

[GLLK79℄ R.E. Graham, E.L. Lawler, J.K. Lenstra, and A.H.G. Rinnooy Kan, Optimization

and approximation in deterministi sequen ing and s heduling, Annals of Dis rete

Mathemati s4 (1979),287326.

[GPW97℄ V.Gordon,E. Potapneva,and F.Werner,Single ma hine s heduling withdeadlines,

release and due dates,Optimization42 (1997), 219244.

[HP94℄ A.M.A.HaririandC.N.Potts,Single ma hines heduling withdeadlines tominimize

the weighted number of tardy jobs, Management S ien e40 (1994), 171219.

[Ja 55℄ J.R.Ja kson,S hedulingaprodu tionlinetominimizemanimumtardiness,Resear h

ReportSPIKE-1989-2, Management S ien eResear h Proje t, University of

Califor-nia,LosAngeles, CA, 1955.

[Law73℄ E.L.Lawler,Optimalsequen ingofasinglema hinesubje ttopre eden e onstraints,

Management S ien e 19 (1973), 544546.

[LL78℄ E.L.Lawlerand J.Labetoulle, On preemptive s hedulingon unrelated paralel

pro es-sors by linear programming, Journal ofthe ACM25(1978), 612619.

[NtL98℄ W.Nuijten and C. Le Pape,Constraint-based job shops heduling withilog

s hed-uler,Journal of Heuristi s 3 (1998), 271286.

Figure

Figure 1: Operations 1, 2, 3 and 4 on the same resoure. 2 time units are required between the
Figure 4: The rst steps of sn
Figure 5: An optimal shedule for the non-preemptive problem with release dates.
Figure 6: R, D, Q and C in the proof of Proposition 6
+3

Références

Documents relatifs

Information can be about the type of the process (informActionType predicate), the potenti- tial recipients of a given piece of information (inform- Forward), the information

- Évolutions de salaire en 2017 (colonne 5) : ensemble des salariés (sauf intérimaires, extras et stagiaires) des entreprises de 10 salariés ou plus ; ensemble des secteurs

Owing to a formal mathematical analogy, the results of the flow boundary value problems with prescribed stretching velocity or prescribed skin friction also apply to the Darcy

A case of reactiva- tion salmonellosis was diagnosed if a patient fulfilled all four of the following criteria: (i) the patient was asymp- tomatic on admission; (ii) bacteremia

In this paper we present a mathematical modeling of network traffic, based on two simple assumptions and derive that in this model traffic ratio is Pareto distributed and volume

In this paper, we consider the FJSP with parallel operations (EFJSP) and we propose and compare a discrete firefly al- gorithm (FA) and a genetic algorithm (GA) for the

The turbulence strength, characterized by the Fried parameter r 0 , can be different for each layer, but the outer scale L 0 for a von Karman model is used as a common value..

In general terms, while working on and exploring the different applications of multi-modal image processing (e.g., compression, scene classification, and spectral unmixing), we