18.10.2014 Views

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SIMSCRIPT II.5 Programming Language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SIMSCRIPT</strong> <strong>II.5</strong> <strong>Programming</strong> <strong>Language</strong><br />

1 event JOBINIT<br />

2 define MACHINE.NAME as a text variable<br />

3<br />

4 create A JOB<br />

5 let ARRIVAL.TIME.. = TIME.V<br />

6<br />

7 read MACHINE.NAME<br />

8 until MACHINE.NAME = “$”DO<br />

9 create a TASK<br />

10 read TASK.DURATION..<br />

11<br />

12 for each PRODUCTION.CENTER<br />

13 with machine.type(production.center) eq machine.name<br />

14 find the first case<br />

15 if found<br />

16 let TASK.DOER(TASK) = PRODCUTION.CENTER<br />

17 file the task in the ROUTING.SET<br />

18 else<br />

19 write MACHINE.NAME as /, “NO FACILITIES FOR :”, T *<br />

20 destroy the TASK<br />

21 always<br />

22 read MACHINE.NAME<br />

23 loop<br />

24<br />

25 activate this JOB now<br />

26<br />

27 end<br />

This event sets up the job data structure.<br />

The first job arrives at time 0. The job’s required machines and associated processing times are read.<br />

As the machine names are read, they are validated against the production center names. The validated<br />

task is then filed into the job’s routing set.<br />

The JOB process is activated.<br />

First job arrives { JOBINIT 0 0 00<br />

at time 0.<br />

Routing and processing{PRESS 0.5 SAW 1.0 SHAPER 0.5 WELDER 2.0 LATHE 1.0 $ *<br />

times for this job<br />

*<br />

⎧JOBINIT 0 0 00<br />

⎪ SAW 1.0 LATHE 4.00 GRINDER 0.5 SHAPER 2.0$ *<br />

Second and subsequent ⎪JOBINIT 0 0 30<br />

jobs with arrival ⎨ DRILL 1. SHAPER 1.00 LATHE 2.0 SHAPER 2.0 MILL 1.00 $ *<br />

times, routing and ⎪JOBINIT 0 2 30<br />

processing times. ⎩ SAW 1.0 WELDER 1.00 DRILL 0.5 LATHE 1.5 MILL 2.00 $<br />

Data read by JOBINIT<br />

242

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

Saved successfully!

Ooh no, something went wrong!