ZXTape! 0Created by SpectaculatorVECTIS3 zz z,VECTIS Release [3.2.1], see also line 870 by Dave Parker www.invectis.co.uk Isle of Wight bus simulation programe. Idea programe design graphics and sound al  DJP Software 1986-2004 Vectis, Feb/Apr 1986 Version 3, Feb 1989 Emulator version, Jan 204  SAVE "VECTIS3" LINE 0 ADevelopment, adjust 2236 2211 3843 1305 8030 1617 1630 and 1012   Initial screen setup %1:5: *2;1,2;"" /Y1;7,1;"By Dave";8,4;"Parker";9 ,4;" 1986" 0$1;10 ,5;"-2004" 44;7,13 ;"";8,13 ;" ";9 ,13 ;"";12 ,13 ;"";13 ,13 ;"";14,13 ;7;"";15,13 ;"" 9M4;0;10 ,13 ;"";11 ,13 ;"" >&0;16,13 ;"" C0;17,11 ;"";18,10 ;"";19,9 ;"";20,8;"";21,7;"" HR0;6;1;18,13 ;"PLEASE";19,14;"WAIT" M91;4;12 ,0;"";13 ,0;"";14,0;"";15,0;"";16,0;"";17,0;0;"";18,0;"";19,0;"";20,0;"";21,0;"" RV1;4;12 ,30;"";13 ,28;"";14,26;"";15,24;"";16,22;"";16,21;17,21;0;"";18,22;"";19,23;"";20,24;"";21,25;"" \|1;7;4;15,24;"invectis";16,26;".co.uk";0;17,25;"/vectis" f#11 ,5;6;"v3.2" Initialisation  collect data/set ch  5400 @0;18,13 ;" ";19,14;" "  6990N price/season/time 0:7;17,13 ;"Select";18,13 ;"season";19,13 ;6;1;"S";0;5;"ummer";20,13 ;"S";1;6;"p";0;5;"ring";21,13 ;6;1;"W";5;0;"inter" p$= !p$"w"p$"p"p$"s"955 Winter p$="w"s=3:989 Summer &p$="s"s=4:p$="p":989 Spring s=5:p$="s" 0;17,11 ;"";18,10 ;"";19,9 ;"";20,8;"";21,7;"":6990N A7:0:17,12 ;"Cost per";18,11 ;"fare stage";6;19,14;"`":4:19,15;(+(pjny)+" ");6;1;21,8;"U";0;5;"p ";6;1;"D";0;5;"own ";1;6;"S";0;5;"elect" f$= ~(pjmf.353333f$="u")(pjmf1.55Fffff$="d")6980D:14,0;1;4;"":f$="_":991 4f$="u"pjny=pjny+.005y# =:pjmf=pjmf-.075} 4f$="d"pjny=pjny-.005y# =:pjmf=pjmf+.075} f$="s"1000  990 0;17,11 ;"";18,10 ;"";19,9 ;"";20,8;"";21,7;"":6990N 2;18,10 ;"Maintenence:";19,12 ;6;"Q";1;"uality";20,13 ;6;"B";1;"asic" )m$=:m$="q"maint=1:1006 m$"b"1002 0;17,11 ;"";18,10 ;"";19,9 ;"";20,8;"";21,7;"":6990N  6500d Screen 1:0:6: 23659k\,0 6;1;0,0;a(1);" ";0,5;a(2);" ";0,17;a(3);" ";0,26;a(4);" ";0,30;a(5);" ";20,4;a(6);" "  1,19;"";2,19;" ";3,18;"";4,1;"";5,1;"";6,2;"";7,4;" ";8,9 ;"";;9 ,9 ;"" 10 ,9 ;"";11 ,9 ;"";12 ,9 ;"";13 ,8;"";14,7;"";15,6;"";16,5;"";17,4;"";18,3;"";19,2;"";20,1;"" 1;12 ,15;"1";2;"2";3;13 ,15;"3";4;"4";5;14,14;"5";6;"6";7;"7" 4,0;"";4,6;"";4,17;"";4,27;"";4,30;"";20,1;""  e6;0,7;"ACCOUNT ";1,7;"` ";2,7;"" 7;8,17;"";9 ,17;"VECTIS BUS CO";10 ,17;" R R ";11 ,17;"B Ven L San " ~7;12 ,17;"C New M San ";13 ,17;"D Sha N New ";14,17;"E Sha O Ven ";15,17;"F Nit P Ven ";16,17;"G Nit Q Ven ";17,17;"H San R New ";18,17;"I San S New ";19,17;"J Sha T Ven ";20,17;"K Ven U Ven ";21,17;"" <5;10 ,20;"R P";10 ,27;"R P" =7;15,10 ;"";16,10 ;"";4;"Seats";17,10 ;7;"";4;"B-F:15";18,10 ;7;"";4;"G-K:21";19,10 ;7;"";4;"L-Q:25";20,10 ;7;"";4;"R-U:30";7;21,10 ;"" !)7;21,0;"" $1;4;1,0;"S S";1,17;"V";1,27;"N";2,0;"A H";2,17;"N";2,27;"I B";3,30;"L";20,2;"NE" )23;1;7,18;"TIME 00:00" ,L3;9 ,7;"";7,10 ;"";11 ,10 ;"" .0;1;8,0;"BUS";9 ,0;"ROUTE";10 ,0;13 ,0;"W:STOP";14,0;"ERROR";:8000@ 05;0;3,3;"";7;"";0;6;5,11 ;"";5;"";6;0;0,23;"";7;"";0;6;5,29;"";0;4;5,25;"";5,19;"" 21;7,3;"";1;2;7,8;"";8,8;4;7;"";1;3;7,15;"";4;7;8,14;"";2;3;15,7;"" 3 6700, 8 7000X Di=142* G Z(i,1),Z(i,2);"" Ki LOut of service Q%maint=11200:No o/s Ri=120 V.((*18))<((*101e))1125e Wb(i,8)=1 [+2;d(i,1),d(i,2);"o/s" ]Subr terminal nos _+a(b(i,7))=a(b(i,7))-1 a6;1;c(b(i,7),1),c(b(i,7),2);" ";c(b(i,7),1),c(b(i,7),2);a(b(i,7)) ei Main Loop ****** add passengers to stops cstats=08030^:22,31;1;1;" when ready to despatch" &i=1̺(pjmf*freq*l(hr+1)) (stp=1+(*42*) 2/z(stp,s)<(1+(*100d))1399w 35#))xtra=2 F0z(stp,6)=9 pl=pl+xtra:1399w GH((z(stp,6)=8)(xtra=2))xtra=1:pl=pl+1 P7z(stp,6)=z(stp,6)+xtra:v1=z(stp,6) n((5v17)+(6v1=8)+(7v1=9 ));((0v17)+(1v18));((0v19 )+(1v1=9 ));z(stp,1),z(stp,2);v1 wi @depreciation charges E(depn=depn+2.37{+(.45ffff*maint) Jacc=fares-(depn+pet) OH1,9 ;" ";6;1,9 ;((.5+acc)) Pstats31620T Q8030^:1;22,0;"Passenger information follows: ";6;"Lost:";pl;" Total:";pass;" Now:";b(1,4)+b(2,4)+b(3,4)+b(4,4)+b(5,4)+b(6,4)+b(7,4)+b(8,4)+b(9 ,4)+b(10 ,4)+b(11 ,4)+b(12 ,4)+b(13 ,4)+b(14,4)+b(15,4)+b(16,4)+b(17,4)+b(18,4)+b(19,4)+b(20,4);" " Ystats11700 ^8030^:22,0;2;"Fuel:`";((.5+pet));" Fixed costs:`";((.5+depn));22,31;4;" Fares:`";((.5+fares));6;" Balance:`";((.5+acc)) Clock .1}L,5 min=min+2 /min60<hr=hr+1:min=min-60< hr=24hr=0  7000X Check non-bus keys  '23560\=94^9500%:DP  o23560\=120x23560\,69E:stats=1:8000@:4;10 ,0;"X:ACCTS" |23560\=121y23560\,69E:stats=2:8000@:8030^:4;11 ,0;"Y:REPORT" n23560\=122z23560\,69E:stats=3:8000@:4;12 ,0;"Z:PGRS" &$23560\119w2200 076;1;1;13 ,0;"Sure? " :/23560\=121y23659k\,2: D$23560\110n1850: N%1;13 ,0;"W:STOP" start new buses? 6freq=freq-0.01z# =:freq<.85Yfreq=.85Y &p$="w"freq<.93nzfreq=.9ffff 'p$="s"freq<.89c =freq=.89c = "freq>1.25 freq=1.25 #23560\32 3000 71;6;8,0;"BUS ":6990N }stats=08030^:22,31;7;1;" Bus code [B,C,..,U] or ";1;"A";0;" if none" ================= ================= howlong=0 w$= w$""2221 ahowlong=howlong+1:howlong>95_1;1;8,0;"BUS":2217  2217 5w$="a"1;8,0;"BUS":3000 freq=freq+.02{# = e=(w$)-97a .e>20e<16980D:2217 Cb(e,2)0b(e,8)=16980D:2217 G1;8,0;"BUS";1;1;(((w$)-32 )) 81;6;9 ,0;"ROUTE":6990N  ========== stats=08030^:22,31;" Route number; ";1;"1 ";2;"2 ";3;"3 ";4;"4 ";5;"5 ";6;"6 ";7;"7" w$= w$=""2240 f=(w$)-480 -f>7f<16980D:2240 Yb(e,7)=-1f=1b(e,1)=1:b(e,5)=1:2335 Yb(e,7)=-1f=5b(e,1)=1:b(e,5)=1:2335 Yb(e,7)=-1f=7b(e,1)=1:b(e,5)=1:2335 Zb(e,7)=-2f=2b(e,1)=2:b(e,5)=17:2335 Yb(e,7)=-2f=4b(e,1)=1:b(e,5)=1:2335 Yb(e,7)=-2f=6b(e,1)=1:b(e,5)=1:2335 Zb(e,7)=-3f=1b(e,1)=2:b(e,5)=24:2335 Zb(e,7)=-3f=3b(e,1)=2:b(e,5)=22:2335 Zb(e,7)=-3f=5b(e,1)=2:b(e,5)=18:2335 Zb(e,7)=-4f=4b(e,1)=2:b(e,5)=26:2335 Zb(e,7)=-5f=6b(e,1)=2:b(e,5)=27:2335 Zb(e,7)=-4f=7b(e,1)=2:b(e,5)=34":2335 Yb(e,7)=-6f=2b(e,1)=1:b(e,5)=1:2335 Yb(e,7)=-6f=3b(e,1)=1:b(e,5)=1:2335  6980D  2240 #1;9 ,0;"ROUTE" Subr from term no !+a(b(e,7))=a(b(e,7))-1 "6;1;c(b(e,7),1),c(b(e,7),2);" ";c(b(e,7),1),c(b(e,7),2);a(b(e,7)) $put bus on map )nb(e,2)=f:f;r(b(e,5),b(e,2)),r(b(e,5),(7+(b(e,2))));""(b(e,1)) . row of Z 3Drz=r(b(e,5),((7*(b(e,1)))+7)+b(e,2)) 8Zero stop matrix =hmp=Z(rz,6) Bput them on the bus G3b(e,4)=hmp:pass=pass+hmp:b(e,9 )=hmp Qz(rz,6)=0 Vput back bus stop ["z(rz,1),z(rz,2);"" \b(e,10 )=0 ` u/d board j^7;d(e,1),d(e,2);b(e,2);f;""(b(e,1));7;b(e,4) 2210 lop (x17) for each bus Q=120 Is bus on map? &"0=b(Q,1)5190F Erase bus on map "PP1=R(B(Q,5),B(Q,2)) .PP2=r(B(Q,5),(7+(B(Q,2)))) PP1,PP2;""(1+(((pp1=4)((pp2=0)(pp2=6)(pP2=17)(pp2=27)(pp2=30)))((pp1=20)(pp2=1)))) reset pos/pass acc/pet -B(Q,5)=B(Q,5)+(h(B(Q,1))) Tpet=pet+B(Q,6):b(q,10 )=b(q,10 )+(pjny*b(q,4))-b(q,6) !fares=fares+(pjny*B(Q,4)) Hadd new pos to map Rgb(q,2);R(B(Q,5),B(Q,2)),r(B(Q,5),(7+B(Q,2)));""(b(q,1)) end of route? Ur(b(q,5),((7*(b(q,1)))+7)+b(q,2))04200h end route/reset B stats ---erase bus pict (se 3210) Lr(b(q,5),b(q,2)),r(b(q,5),(7+(b(q,2))));"" --- reset bus info Lb(q,7)=r(b(q,5),((7*b(q,1))+7)+b(q,2)) ;7;d(q,1),d(q,2);t$(b(q,7));" " --- add to term no +a(b(q,7))=a(b(q,7))+1 W6;1;c(b(q,7),1),c(b(q,7),2);a(b(q,7)) arrno=arrno+1 stats23847 8030^:22,0;(b(q,2));"Arrival #";arrno;" at ";t$((b(q,7)));": time ";:7100:b(q,2);22,31;" Bus ";((65A+q));": Profit=`";((.5+(b(q,10 ))));" Passgrs=";b(q,9 ) Bb(q,1)=0:b(q,2)=0:b(q,4)=0  5190F %erase bus picture/bus station stats hAre we at the bus stop? mIf not then Q r?0=r((b(q,5)),(14+B(Q,2)))5190F 0Release passengers :"B(q,4)=04600 DEb(q,4)=b(q,4)-(((*(1+(b(q,4)/3))))) take on new pass --- row of Z  Drz=r(b(q,5),((7*(b(q,1)))+7)+b(q,2)) --- seat cpcty/h.m. wait  1sc=b(q,3)-b(q,4):hmp=z(rz,6) *--- correct for max cpcty 4Iscnb(q,4)=b(q,4)+hmp:Z(rz,6)=z(rz,6)-hmp:pass=pass+hmp:b(q,9 )=b(q,9 )+hmp H/--- if pass are now 0 then put back stop sign R9Z(rz,6)=0z(rz,1),z(rz,2);"" W--- u/d matrix [f7;d(q,1),2+(d(q,2));" ";d(q,1),2+(d(q,2));b(q,4) Fq O 1200 Define chars +Chars (eg bus) use G mode (a - u)  i=113 :p$ "j=07 ' g:p$+j,g ,j 6i 9Box ;u"b",0,01111110~,01000010B,01000010B,01000010B,01000010B,01111110~,0 @ bus Dm"c",0,0,11111100,11010100,11111111,11111111,01000010B,0 EGraphic = jklm Fu"l",0,001101117,01000010B,01000010B,01000010B,001100102,0,11111111 Gv"m",0,01001100L,01010000P,01001000H,01000100D,01011000X,0,11111111 JBus Om"e",0,0,00111111?,00101011+,11111111,11111111,01000010B,0 T Bus stop Ym"s",0,00011000,00100100$,01111110~,00100100$,00011000,0,0 [Arrows \]"i",0,00000001,00000010,0,0,0,0,00000011 ]m"f",00000100,00001110,00010101,00000100,00000100,0,0,0 _m"g",0,0,0,00000100,00000010,00011111,00000010,00000100 cm"h",00100000 ,00100000 ,10101000,01110000p,00100000 ,0,0,0 du"j",0,00101001),00101101-,00101011+,00101001),00101001),0,11111111 eu"k",0,01010111W,01010100T,01010110V,00100100$,00100111',0,11111111 fe"a",0,0,00111100<,00100100$,00100100$,00111100<,0,0 hVars jVpl=0:fares=0:depn=0:pass=0:pet=0:pjny=0.055|aG sIfreq=1:pjmf=1:stats=0:arrno=0:maint=0 |Collect data vars ~Fares by bus type jf1=.16~# =:f2=.22~aG:f3=.26R:f4=.353333:opas=0:op=0:ob=0:or=0 Set B matrix b(20,10 ) 15,15,15,15,15,21,21,21,21,21,25,25,25,25,25,25,30,30,30,30,f1,f1,f1,f1,f1,f2,f2,f2,f2,f2,f3,f3,f3,f3,f3,f3,f4,f4,f4,f4,-3,-6,-2,-2,-4,-4,-1,-1,-2,-3,-1,-1,-6,-3,-3,-3,-6,-6,-3,-3 i=120 b(i,3) i i=120 b(i,6) i i=120 b(i,7) i Matrix R; route info Rows = positions Cols 1-7; Route rows Then cols then stop Rows ...cols R(34",28)  Route 1 4,4,5,6,6,7,6,5,4,5,6,7,8,9 ,9 ,9 ,9 ,9 ,8,7,7,6,5,4 0,1,1,2,3,4,5,5,6,7,8,9 ,9 ,9 ,10 ,11 ,12 ,13 ,13 ,13 ,14,15,16,17 ӏ1,0,0,0,0,20,0,0,3,0,23,0,0,27,0,0,29,0,0,0,0,24,0,-3,-1,0,0,0,0,21,0,0,18,0,22,0,0,26,0,0,30,0,0,0,0,25,0,15 j=1227 i=124 R(i,j) i j  Route 2 20,19,18,17,16,15,14,13 ,12 ,11 ,10 ,9 ,8,7,6,5,4,1,2,3,4,5,6,7,8,9 ,9 ,9 ,9 ,9 ,9 ,8,7,6 37%,0,0,0,35#,0,33!,0,31,0,0,26,0,0,22,0,-2,-6,0,0,0,36$,0,34",0,32 ,0,0,28,0,0,23,0,3 j=2237 i=117 R(i,j) i j  Route 3 v20,19,18,17,16,15,14,13 ,12 ,11 ,10 ,9 ,9 ,9 ,9 ,9 ,8,7,7,6,5,4,1,2,3,4,5,6,7,8,9 ,9 ,9 ,9 ,10 ,11 ,12 ,13 ,13 ,13 ,14,15,16,17 q37%,0,0,0,35#,0,33!,0,31,0,0,27,0,0,29,0,0,0,0,24,0,-3,-6,0,0,0,36$,0,34",0,32 ,0,0,28,0,0,30,0,0,0,0,25,0,15 j=3247 i=122 R(i,j) i j  Route 4  4,5,6,7,8,9 ,9 ,9 ,9 ,9 ,8,7,7,6,5,4,4,4,4,4,4,4,4,4,4,4,6,7,8,9 ,9 ,9 ,10 ,11 ,12 ,13 ,13 ,13 ,14,15,16,17,18,19,20,21,22,23,24,25,26,27  3,0,23,0,0,27,0,0,29,0,0,0,0,24,0,6,0,0,0,41),0,42*,0,0,0,-4,-2,0,22,0,0,26,0,0,30,0,0,0,0,25,0,15,0,0,0,14,0,13 ,0,0,0,12  j=4257 i=126 r(i,j) i j  Route 5 )4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,1,2,3,4,5,6,7,8,9 ,10 ,11 ,12 ,13 ,14,15,16,17 (1,0,2,0,0,0,3,0,0,4,0,0,0,0,5,0,0,-3,-1,0,19,0,0,0,18,0,0,17,0,0,0,0,16,0,0,15 !j=5267 &i=118 +R(i,j) 0i 5j : Route 6 ?4,4,4,4,4,4,4,4,4,4,4,4,3,2,1,1,1,1,1,1,1,2,3,4,4,4,4,6,7,8,9 ,10 ,11 ,12 ,13 ,14,15,16,17,18,19,19,20,21,22,23,24,25,25,26,27,28,29,30 B3,0,0,4,0,0,0,0,5,0,0,6,0,0,0,7,0,8,0,0,0,9 ,0,10 ,0,0,-5,-2,0,0,17,0,0,0,0,16,0,0,15,0,0,0,38&,0,39',0,0,0,40(,0,12 ,0,0,11 Dj=6277 Ii=127 NR(i,j) Si Xj ] Route 7 b74,4,4,4,4,4,4,5,6,7,8,9 ,9 ,9 ,9 ,9 ,8,7,7,6,5,4,3,2,1,1,1,1,1,1,1,2,3,4,0,1,2,3,4,5,6,7,8,9 ,9 ,9 ,10 ,11 ,12 ,13 ,13 ,13 ,14,15,16,17,18,19,19,20,21,22,23,24,25,25,26,27 d21,0,2,0,0,0,3,0,23,0,0,27,0,0,29,0,0,0,0,24,0,6,0,0,0,7,0,8,0,0,0,9 ,0,-4,-1,0,19,0,0,0,18,0,22,0,0,26,0,0,30,0,0,0,0,25,0,15,0,0,0,38&,0,39',0,0,0,40(,0,12 gj=7287 li=134" qR(i,j) vi {j  Stops --- x,y,win,sum,spr,pass Z(42*,6) 3,3,3,3,3,3,0,0,2,3,5,5,5,5,5,5,5,5,5,6,8,6,6,6,6,9 ,8,10 ,8,10 ,12 ,12 ,14,14,16,16,20,2,2,2,3,3,0,2,6,9 ,14,17,20,22,26,27,30,27,23,21,17,14,9 ,6,2,4,4,7,9 ,14,16,8,10 ,10 ,12 ,12 ,8,10 ,6,8,4,6,0,20,22,24,21,23 q502,40(,70F,502,25,40(,30,30,30,10 ,20,30,20,23,65A,30,502,502,20,30,20,40(,502,45-,502,35#,35#,35#,60<,60<,40(,40(,40(,40(,40(,20,60<,30,35#,20,20,30,99c,60<,100d,80P,40(,80P,75K,60<,75K,40(,75K,60<,40(,45-,100d,502,80P,95_,40(,40(,30,60<,70F,65A,70F,557,557,557,80P,80P,80P,80P,60<,75K,75K,40(,99c,75K,65A,75K,40(,45-,75K,502,90Z,60<,30,502,502,40(,40(,25,502,40(,30,32 ,95_,40(,60<,75K,30,45-,20,502,60<,557,60<,45-,502,45-,60<,60<,70F,70F,502,502,502,30,99c,502,45-,502,30,35# 'j=15:i=142* Z(i,j) i j Terminus names t$(6,3) t$(1)="San" t$(2)="Sha" t$(3)="Ven" t$(4)="Nit" t$(5)="Bla" t$(6)="New" How busy each hour  l(24) 0,0,0,0,0,4,9 ,20,24,19,21,21,19,18,19,21,22,25,20,16,14,12 ,7,0 i=124 l(i) i 14,3,7,2,0,4  a(6)  i=16 a(i) i Row + col for "a" e0,0,0,0,0,20,0,5,17,26,30,4  c(6,2) %&j=12:i=16 'c(i,j) *i /j 4Bus info board locn 9d(20,2) >i11 ,12 ,13 ,14,15,16,17,18,19,20,11 ,12 ,13 ,14,15,16,17,18,19,20,20,20,20,20,20,20,20,20,20,20,27,27,27,27,27,27,27,27,27,27 C'j=12:i=120 Hd(i,j) Mi Rj T1,-1 V h(2) W h(1) X h(2) c d Get answers n --- clock x>7;0;17,11 ;"SET CLOCK":6990N y7;0;19,12 ;6;1;"F";0;5;"orwards";20,11 ;6;1;"B";5;0;"ackwards";21,12 ;1;6;"S";5;0;"elect" ==================== ================= hr=6:min=20 w$= \w$="f"min=min+5:min=60<min=0:hr=hr+1:hr=24hr=0 ^w$="b"min=min-5:min=-5min=557:hr=hr-1:hr=-1hr=23 -3;1;6,23;"CLOCK" )3;1;7,25;":" -w$="s"1;14,0;"TIME":  7000X w$="_"  6550 , --- season 6================ @================ r6p$="p"1;3;6,20;"SUMMER" |6p$="w"1;3;6,20;"WINTER" 6p$="s"1;3;6,20;"SPRING"  D --- error E?1;1;2;7;14,0;"ERROR" I6.6,9 :.2~L,7:.2~L,7 K$1;14,0;"ERROR" M N.07}\(,-9 : PClear lines 22,33 R================== T================== W X Subr clock Y================== Z================== b8hr9 1;3;7,23;"0";hr g4hr>9 1;3;7,23;hr l:min9 1;3;7,26;"0";min q6min>9 1;3;7,26;min v (Subr clock with atributes pre-selected =============  hr<9 b(q,2);"0"; 8b(q,2);hr;":";:min9 b(q,2);"0"; b(q,2);min: @Print report menu J^1;10 ,0;"X:ACCTS";11 ,0;"Y:REPORT";12 ,0;"Z:PGRS" T ^ Clear 21/22 _V22,0;" " g #(7:0: #2 7 %Out ......... %23659k\,2 %!*21,0;"End simulation ..."