* Model for harbor simulation. v. 2/19/96 * * (Based on Schriber, Simulation Using GPSS, 1974, pp. 329-332.) * * Model description: A port in the U.K. is used to load tankers * with crude oil for overwater shipment. The port has facilities * for loading as many as three tankers simultaneously. The * tankers, which arrive at the port every 11 +/- 7 hours, are * of three types, and their loading requirements are shown * below. * * ------------------------------- * Relative Loading * Type Frequency Time, Hours * ------------------------------- * 1 .25 18 +/- 2 * 2 .55 24 +/- 3 * 3 .20 36 +/- 4 * ------------------------------- * * There is one tug at the port. Tankers of all types require * the services of this tug to move into a berth. Furthermore, * the area experiences frequent storms, and no berthing or * deberthing can take place when a storm is in progress. When * storms occur, they last 4 +/- 2 hours. The time between the * end of one storm and the beginning of onset of the next is * exponential with a mean of 48 hours. When a tug is available * and no storm is in progress, berthing or deberthing takes * about one hour. * * Operating experience shows that the three berths at the port * are occupied about 80 percent of the time. On average, due * to delays because of storms, unavailability of a berth, or * unavailability of the tug, tanker residence time at the port * exceeds the mean tanker loading time by about 5 hours. This * is true for each type of tanker. * * A shipper is considering bidding on a contract to transport * oil from the port to the United States. He has determined * that five tankers of a particular type would have to be * committed to this taks to meet contract requirements. These * tankers would require 21 +/- 3 hours to load oil at the port. * After loading and deberthing, they would travel to the United * States, offload the oil return to the port for reloading, and * continue the cycle. Their round-trip time, including off- * loading, is estimated to be 240 +/- 24 hours. * * Before the port authorities can commit themselves to accommodating * the proposed five tankers, the effect of the additional port * traffic on the in-port residence time of the current port users * must be determined. * * Purpose: measure the in-port residence time of the proposed * additional tankers, as well as the three types which already * use the port. Run for one year. * SIMULATE EXPON FUNCTION RN3,C24 Exponential distribution defn .000,.000/.100,.104/.200,.222/.300,.355/.400,.509/.500,.690/ .600,.915/.700,1.20/.750,1.38/.800,1.60/.840,1.83/.880,2.12/ .900,2.30/.920,2.52/.940,2.81/.950,2.99/.960,3.20/.970,3.50/ .980,3.90/.990,4.60/.995,5.30/.998,6.20/.999,7.00/.9997,8.0 MEAN FUNCTION P1,L4 Mean service time for tanker type P1 1,18/2,24/3,36/4,21 SPREAD FUNCTION P1,L4 Service time spread for tanker type P1 1,2/2,3/3,4/4,3 TYPE FUNCTION RN1,D3 Distribution of other tanker types .25,1/.8,2/1,3 * * Storage capacities * STORAGE S$BERTH,3 Provide 3 berths * * Table definitions * 1 TABLE M1,20,15,9 Port residence, tanker type 1 2 TABLE M1,20,15,9 Port residence, tanker type 2 3 TABLE M1,40,15,9 Port residence, tanker type 3 4 TABLE MP3,20,15,9 Port residence, proposed tankers * * Variables * GOIN BVARIABLE SNF$BERTH*FNU$TUG*LR$STORM Berth leaving conditions GOOUT BVARIABLE FNU$TUG*LR$STORM Berth exit conditions SPACE VARIABLE 48*N$HERE To space out first arrivals * * Storm generating segment * GENERATE ,,,1 Start the storm segment NEXT ADVANCE 48,FN$EXPON Storm interarrival time 48 LOGIC S STORM Storm arrives ADVANCE 4,2 Storming LOGIC R STORM Storm abates TRANSFER ,NEXT Cycle * * Initialization for proposed tankers * GENERATE ,,,5 Create the tankers ASSIGN 1,4 Code the tanker type HERE ADVANCE V$SPACE Space out the first arrivals MARK 3 Set P3 = arrival time at port TRANSFER ,PORT Jump into segment below * * Port activities * GENERATE 11,7 Other tankers arrive at port ASSIGN 1,FN$TYPE Record tanker type PORT QUEUE PORTQ Queue up for entering harbor TEST E BV$GOIN,1 Hold til ok to enter DEPART PORTQ SEIZE TUG Get the tug (already know is available) ENTER BERTH Get a berth (already know one is avail) ADVANCE 1 Move tanker to berth RELEASE TUG Tug no longer needed ASSIGN 2,FN$SPREAD P2 is service time spread ADVANCE FN$MEAN,P2 Load tanker TEST E BV$GOOUT,1 Wait til ok to leave SEIZE TUG Get the tug (its available) ADVANCE 1 Move tanker from berth RELEASE TUG Tug no longer needed LEAVE BERTH Berth now available to other tankers TABULATE P1 Record time in port TEST NE P1,4,CYCLE Filter out proposed tankers TERMINATE Other tankers disappear from model CYCLE ADVANCE 240,24 Proposed tankers make round trip MARK 3 Record time of return to port TRANSFER ,PORT Tanker back at port * * ``Warm up'' model * RUNTIM GENERATE 720 One month TERMINATE 1 * START 1,NP * * Set model run time * RUNTIM GENERATE 8760 Run for 1 year (8760 hours) RESET START 1 * * Repeat 3 times * RESET START 1 * RESET START 1 * RESET START 1 END