Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

1. Make model as shown in figure 1 by adding elements on the layout.

String variable Real variable Real variable function

Integer
Real variables (all cost variables)
variable

Figure 1: Scheduling model

2. Put following field values in part details of parts A,B, C and, D


Part A:
Maximum arrivals: 10
Inter-arrival time: 1
Lot Size:10

Part B:
Maximum arrivals: 10
Inter-arrival time: 1
Lot Size:10

Part C:
Maximum arrivals: 13
Inter-arrival time: 1
Lot Size:13
Part D:
Maximum arrivals: 14
Inter-arrival time: 1
Lot Size:14

3. In action on output of buffer A add following code


CT = 3
IF CurrentPart = "A"
ST = 0
ELSEIF CurrentPart = "B"
ST = 2
ELSEIF CurrentPart = "C"
ST = 3
ELSEIF CurrentPart = "D"
ST = 2.5
ENDIF

4. In action on output of buffer B add following code


CT = 5
IF CurrentPart = "A"
ST = 3
ELSEIF CurrentPart = "B"
ST = 0
ELSEIF CurrentPart = "C"
ST = 3.2
ELSEIF CurrentPart = "D"
ST = 2.7
ENDIF

5. In action on output of buffer C add following code


CT = 1.5
IF CurrentPart = "A"
ST = 2.6
ELSEIF CurrentPart = "B"
ST = 3
ELSEIF CurrentPart = "C"
ST = 0
ELSEIF CurrentPart = "D"
ST = 3.1
ENDIF

6. In action on output of buffer D add following code


CT = 2.5
IF CurrentPart = "A"
ST = 3.2
ELSEIF CurrentPart = "B"
ST = 2.4
ELSEIF CurrentPart = "C"
ST = 1.9
ELSEIF CurrentPart = "D"
ST = 0
ENDIF

7. Add following input rule (From button) for machine WorkCentre


IF s = 1
SEQUENCE /Next BufferA#(10),
BufferD#(14),
BufferC#(13),
BufferB#(10)
ELSEIF s = 2
SEQUENCE /Next BufferB#(10),
BufferC#(13),
BufferD#(14),
BufferA#(10)
ELSEIF s = 3
SEQUENCE /Next BufferA#(10),
BufferD#(14),
BufferC#(13),
BufferB#(10)
ELSEIF s = 4
SEQUENCE /Next BufferC#(13),
BufferA#(10),
BufferB#(10),
BufferD#(14)
ELSE
Wait
ENDIF

8. In action on output of WorkCentre add following code


IF TYPE = A
CurrentPart = " A"
ELSEIF TYPE = B
CurrentPart = "B"
ELSEIF TYPE = C
CurrentPart = " C"
ELSEIF TYPE = D
CurrentPart = "D"
ENDIF
total_cost = OBJ ()

9. In the function body of OBJ add following code


IF 10 * AFlow (A) > 100
CostA = (10 * AFlow (A) - 100) * 1
ELSEIF 10 * AFlow (A) <= 100
CostA = (100 - 10 * AFlow (A)) * 2
ENDIF
IF 10 * AFlow (B) > 70
CostB = (10 * AFlow (B) - 70) * 3
ELSEIF 10 * AFlow (B) <= 70
CostB = (70 - 10 * AFlow (B)) * 3
ENDIF
IF 13 * AFlow (C) > 60
CostC = (10 * AFlow (C) - 60) * 2
ELSEIF 13 * AFlow (C) <= 60
CostC = (100 - 10 * AFlow (C)) * 1.2
ENDIF
IF 14 * AFlow (D) > 120
CostD = (10 * AFlow (D) - 120) * 1
ELSEIF 14 * AFlow (D) <= 120
CostD = (120 - 10 * AFlow (D)) * 1.8
ENDIF
RETURN CostA + CostB + CostC + CostD

You might also like