12.07.2015 Views

Modeling and Optimization of Traffic Flow in Urban Areas - Czech ...

Modeling and Optimization of Traffic Flow in Urban Areas - Czech ...

Modeling and Optimization of Traffic Flow in Urban Areas - Czech ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.3 Implemented Algorithm 49unit j on the processor k then x ijk = true, otherwise x ijk = false. Foreach task T i , where i = 1 . . . n, there are S × R Boolean variables, where Sdenotes the maximum number <strong>of</strong> time units <strong>and</strong> R denotes the total number<strong>of</strong> processors.The Boolean variables are constra<strong>in</strong>ed by the three follow<strong>in</strong>g rules (modestadaptation <strong>of</strong> [Memi 02]):1. For each task, exactly one <strong>of</strong> the S × R variables has to be equalto true. Therefore two clauses are generated for each task T i . The firstguarantees hav<strong>in</strong>g at most one variable equal to true:(¯x i11 ∨ ¯x i21 ) ∧ · · · ∧ (¯x i11 ∨ ¯x iSR ) ∧ · · · ∧ (¯x i(S−∞)R ∨ ¯x iSR ).The second guarantees hav<strong>in</strong>g at least one variable equal to true: (¯x i11 ∨¯x i21 ∨ · · · ∨ ¯x i(S−∞)R ∨ ¯x iSR ).2. If there are a precedence constra<strong>in</strong>ts such that T u is the predecessor<strong>of</strong> T v , then T v cannot start before the execution <strong>of</strong> T u is f<strong>in</strong>ished. Therefore,x ujk → (¯x v1l ∧ · · · ∧ ¯x vjl ∧ ¯x v(j+1)l ∧ · · · ∧ ¯x v(j+pu−1)l) for all possible comb<strong>in</strong>ations<strong>of</strong> processors k <strong>and</strong> l, where p u denotes the process<strong>in</strong>g time <strong>of</strong> taskT u .3. At any time unit, there is at most one task executed on a givenprocessor. For the couple <strong>of</strong> tasks with a precedence constra<strong>in</strong> this rule isensured already by the clauses <strong>in</strong> the rule number 2. Otherwise the set <strong>of</strong>clauses is generated for each processor k <strong>and</strong> each time unit j for all couplesT u , T v without precedence constra<strong>in</strong>s <strong>in</strong> the follow<strong>in</strong>g form:(x ujk → ¯x vjk ) ∧ (x ujk → ¯x v(j+1)k ) ∧ · · · ∧ (x ujk → ¯x v(j+pu−1)k).The toolbox cooperates with the zChaff solver [Mosk 01] to decidewhether the set <strong>of</strong> clauses is satisfiable. If it is, the schedule with<strong>in</strong> S timeunits is feasible. An optimal schedule is found <strong>in</strong> an iterative manner. First,the List Schedul<strong>in</strong>g algorithm (see 4.3.1) is used to f<strong>in</strong>d the <strong>in</strong>itial value <strong>of</strong> S.Then the algorithm iteratively decreases the value <strong>of</strong> S by one <strong>and</strong> tests thefeasibility <strong>of</strong> the solution. The iterative algorithm f<strong>in</strong>ishes when the solutionis not feasible.An example <strong>of</strong> the P |prec|C max problem can be taken from the digitalsignal process<strong>in</strong>g area. A typical schedul<strong>in</strong>g problem is to optimize thespeed <strong>of</strong> a computation loop, e.g constitut<strong>in</strong>g the Jaumann wave digital filter[Groo 92]. The goal is to m<strong>in</strong>imize the computation time <strong>of</strong> the filterloop, shown as a directed acyclic graph <strong>in</strong> Fig. 4.8. The nodes <strong>in</strong> the graphrepresent the tasks (i.e. operations <strong>of</strong> the loop) <strong>and</strong> the edges represent the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!