routine INIT

define I as an integer variable

define X,
       Y as double variables


''call INIT.PC

let STREAM = 1

let CUSTOMER.MARKTYPE = 3
let DESTINATION.MARKTYPE = 5
let MARKCOLOR = 1
let MARKSIZE = 1500

reserve POINT(*, *) as 2 by 4

let XLO = -100  let V.XLO =   500
let XHI = +100  let V.XHI = 15884
let YLO = -100  let V.YLO = 13134
let YHI = +100  let V.YHI = 28518

call DRAW.BORDER
call DRAW.LABELS

let VXFORM.V = 1
call SETWORLD.R given XLO, XHI, YLO, YHI
call SETVIEW.R given V.XLO, V.XHI, V.YLO, V.YHI

create each TAXI.RESOURCE(1)
let TAXI.RESOURCE = 1
let U.TAXI.RESOURCE = .NUM.TAXIS

reserve TAXI(*) as .NUM.TAXIS
for I = 1 to .NUM.TAXIS do
    create a TAXI.ENTITY called TAXI(I)
    call GENERATE.POINT yielding X, Y
    display TAXI(I) with CONCAT.F("taxi", ITOT.F(I), ".icn") at (X, Y)
loop

reserve REVENUE(*) as .NUM.TAXIS

let TAXI.SPEED = 3.75

let MEAN.INTERARRIVAL.TIME = 60

let LOADING.UNLOADING.TIME = 3

let FLAT.FEE = XHI / 4

let TIMESCALE.V = 10 * HOURS.V * MINUTES.V

let TIMESYNC.V = 'CLOCK.UPDATE'

display CLOCK.TIME with "clock.grf"

show REVENUE with "revenue.grf"

display histogram WAITING.TIME.HISTOGRAM with "wait.grf"

end
