/* called by: entrance ctrl of the object 'track'
9 P: Q/ w3 E6 @/ E3 `*/
( Y; }# R* e/ c' His
3 m6 T8 b9 v+ {9 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 C% T6 W9 y$ N7 U9 y9 D& t5 {# x$ pdo' O- b) [1 F, ]% Z, M' g3 O/ P
Lan := rootfolder.Internal.Tools.AOLlanguage;
: x7 a6 X% W% g( Y' G4 X1 Q% e if current = @.Destination -- else return+ q/ i5 H Z7 z. l$ {
then y4 {: B1 P+ g O6 r2 K
@.Destination := void;
+ A+ y1 C) U( B0 H b9 W if @.occupied then1 K0 d. O! Y$ L5 ^
part := @.cont;
6 Z- M# J$ _3 N @.transpOrder := void;
/ [* n& ]9 e* t$ @2 g2 ]) r5 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: z4 M! o/ @% K) E
@,root.eventcontroller.simTime);
: J: t3 {* O, t V4 V @.HasOrder := false;
; P! f0 I' e" `; K9 S @.DrivingHome := true;
n4 |9 P4 t. ~9 U rgManager.tryToStartTransOrder;1 U; u) ?+ n# o6 E" w3 f5 d
if @.Destination = void
; b/ H: O) c2 o then -- no transport order for vehicle @ u, m3 S. {3 `! }7 y) g
@.Destination :=9 S. E8 v5 V+ m3 l
rgManager.nearestFreeStation(@,track.~);" J( f2 R4 q3 k* C: Q
newDirection(@);
9 B' X2 N9 r! H- Y( F+ y if @.Destination /= void then
1 Z- Q: Q' r9 K' S( B+ | @.Destination.NumReservation :=
, |, q7 C+ a: p, n% I" ]" W @.Destination.NumReservation + 1;
$ \/ C2 c5 i) f end;
9 f0 V4 S9 g& H7 r; d @.CurrIcon := "drivingHome";9 w0 P6 C# ?1 o
@.DrivingHome := true;+ k& N5 ]! V; j; I
end;2 d* q4 @: N# P- A7 Q% T$ i! ]% h7 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% j/ [* k" ?$ j7 h9 K+ X5 S
part := @.transpOrder;
" f6 i/ }& O- Z; ? part.move(@);-- load part0 c: N4 p. y1 m5 `# J0 O" \
@.CurrIcon := "load";
8 c' l% k3 Y. |6 x GlobalDistObj := part.globDestination;$ w( k. n K; H2 L L/ G Y" g( L" K
assignLObj := rgmanager.rgAssignL;
" A5 X/ ~2 E/ E, I9 y' Y row := assignLObj.getRowNo(GlobalDistObj);
' |, Q# R; J& P0 L! b if Row = -1 then -- since 70* e# I" E9 ]2 @# z- U9 a+ n
if lan=1 then9 b# s$ w6 ]9 P' D3 b6 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# H0 f9 h9 S2 g" q: l; Y2 n to_str("in der Andockstation: \"",?.~.name,"\""));& c8 W! y/ O: e( v
else
+ G6 o5 F; f3 o% d0 ]$ d4 R# y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, v' ^2 s. _, Z" @0 @ to_str("in docking station: \"",?.~.name,"\"")); F7 b2 s; Q7 X" M/ S" c5 n" ?
end;; k; i% `. Z8 v. }& T
else
9 C" h4 I4 u* u2 w @.Destination := assignLObj[1,row];
3 {9 X6 O# } Q5 v end; ) j7 B+ C6 I2 U9 V2 Y; ]! Q9 Y
newDirection(@);
5 U# r+ h$ Y6 s @.HasOrder := true;$ e8 D2 |# a. t& G& z) ]
end;
- {" k/ ^5 b& M4 G- b. z end;
9 V/ a& D5 Z+ r) H' J' n1 Lend; -- of the method
9 k9 h- ~, i$ \; A4 C5 X2 F/ N |