/* called by: entrance ctrl of the object 'track'
8 |' C- G. y$ W0 Z ~$ v*/7 x, V1 t: L1 f: g6 i3 S' ?
is
) P# n7 b, i) G& b) g3 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;! w/ B" G& i b5 C/ h) \
do
9 {: M9 E \* [' p Lan := rootfolder.Internal.Tools.AOLlanguage;
6 z* Q, P+ y4 J+ h$ D8 O if current = @.Destination -- else return9 |* z2 N% w( r D" T; X: \
then
( u, g! I9 S U @.Destination := void;
: D1 a R* [3 a( u if @.occupied then
) s' X6 p4 s2 r+ m9 Y: h; C/ X D. ~ part := @.cont;2 @! m# e; {. H4 F
@.transpOrder := void;8 h7 w* a; i8 \; b# J( d# U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 o. S& _8 n* d! G5 m! |) s8 J
@,root.eventcontroller.simTime); d9 E! }/ H" M. o) d( U6 u7 V
@.HasOrder := false;4 p, A0 r0 L% H$ g+ q! o& B
@.DrivingHome := true;1 W5 \+ p# n! l$ M! y
rgManager.tryToStartTransOrder;+ m: K. l# D, ~- p" A
if @.Destination = void
% Z1 a7 C+ t/ P* ^' G then -- no transport order for vehicle @
1 U0 }6 c4 ~4 M6 ` @.Destination :=0 _, H/ Q6 q3 G9 c. u
rgManager.nearestFreeStation(@,track.~);4 G0 ?, d1 r& C r$ s
newDirection(@); " [4 N4 Z/ C3 M! e4 f
if @.Destination /= void then
3 A% o0 v# a4 k% V @.Destination.NumReservation :=
( A* ?5 A: p) K- X/ Z5 ?& \ @.Destination.NumReservation + 1;
3 I2 u2 y3 |% p6 {! b end;9 _- r' Q# p* M% o8 J1 ^; Z* A2 }
@.CurrIcon := "drivingHome";
' B) p- G8 e3 _( r1 d8 P @.DrivingHome := true;1 }5 |% E- ?9 M
end;
9 n7 ^% S/ n( g8 F% v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; J, ^( b& p9 {: A part := @.transpOrder;
; H7 j) r9 Y( W' K part.move(@);-- load part
1 B* P& Q$ o( U @.CurrIcon := "load";1 I# T6 [' r4 J" s3 S
GlobalDistObj := part.globDestination;3 |# E0 `2 i$ c3 r& f# T
assignLObj := rgmanager.rgAssignL;
! K N# K* c& g4 A" `0 ^8 t row := assignLObj.getRowNo(GlobalDistObj);
: k0 d" F0 m5 N* u& u5 q if Row = -1 then -- since 70* O. Q0 x1 t* O7 K8 h
if lan=1 then
" U' Z5 y9 Z4 E# g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: n9 q/ f; d/ T# O0 Y
to_str("in der Andockstation: \"",?.~.name,"\""));
$ G; c5 |" |% Z% O' U else
7 D* w9 ~/ Z; }/ W" {% i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 Y& E1 _. w& [& L* i5 w2 x. q to_str("in docking station: \"",?.~.name,"\""));
0 g& b. J+ Z! ^, X5 I) T" d end;& o0 Y, \7 N1 m) O' S! s8 ~: v
else
D- M5 | s- g- O6 r6 Y @.Destination := assignLObj[1,row];
% @3 F- i. Q) e, l, @) n end;
; ^9 r# m& Q- N newDirection(@); j0 s- f% e& c1 A6 P6 E6 |
@.HasOrder := true;/ o0 {' _- z+ b0 ^8 w
end;
: s( K0 t* c+ d7 q8 ?8 _ end;7 |* R: D( l. C. A8 F9 k
end; -- of the method+ b4 @0 F" v. A; p: N! d
|