/* called by: entrance ctrl of the object 'track'
, X1 {" f6 W9 Z1 R- O*/3 `: V8 u/ S1 I8 r
is
S) R& @+ @8 D9 L5 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) L( t+ e7 o/ E4 P) Rdo' n- ?$ A. p0 R4 N" @
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ b9 b" K4 ~ D: B4 h' Q if current = @.Destination -- else return" I( @8 u5 @! [( Q% {
then/ X: m& ^+ y7 P! i8 s5 ]
@.Destination := void; O# [% }+ X+ ~/ ^
if @.occupied then7 s } ]- b! c* {9 U
part := @.cont;
- w' K { p& r, J' U @.transpOrder := void;8 v% _1 _; d5 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ L/ m8 b: e; R3 Z6 i V. V
@,root.eventcontroller.simTime);0 ]1 _/ m: M% Z% u
@.HasOrder := false;
) f( d7 f% H) l7 @ @.DrivingHome := true;
# D" E+ k9 _7 H rgManager.tryToStartTransOrder;
/ j* c5 H% W r6 O+ k9 W% M- f if @.Destination = void
- e3 f' {* e! P) u2 y, g6 D then -- no transport order for vehicle @( r/ e+ r! u* k- |6 d
@.Destination :=3 b9 E- g5 t% F
rgManager.nearestFreeStation(@,track.~);
5 E- t. }' N2 R5 A0 g/ n newDirection(@);
. Q! m, I W0 ]. M8 `+ I if @.Destination /= void then6 I, h H; w' |0 ~+ _; v* D/ ^, a
@.Destination.NumReservation :=% j1 c9 @% p4 o
@.Destination.NumReservation + 1;
/ p& h; e8 i2 K end;
7 V; ]1 B! l; S X7 |5 ~- \ @.CurrIcon := "drivingHome";
2 E% A" g9 D i7 t2 L( q @.DrivingHome := true;
- \9 B. S% }% R& @: o* C5 H end;
) j' a! c! z) Z& X2 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 z7 N' w1 G9 s! ^) K
part := @.transpOrder;, O8 U5 g; _/ e7 J8 [
part.move(@);-- load part2 Z/ P7 ?$ d* J, L' s- v
@.CurrIcon := "load";
& a0 P& F- f8 ]! ~. m GlobalDistObj := part.globDestination;
; D) d( U% U' ?" X/ ~, ^; M# Y! M assignLObj := rgmanager.rgAssignL;
1 N4 H9 M. g& c3 t) u" i row := assignLObj.getRowNo(GlobalDistObj);* R. g6 k' a M% P( }7 i
if Row = -1 then -- since 70* i @, J( \) b3 P! q8 n$ J8 {
if lan=1 then8 V$ N9 Z& A' I- @* r# \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 V, C" { } G6 f to_str("in der Andockstation: \"",?.~.name,"\""));1 @6 F& I3 j" L* |* p
else2 E: T' Z/ v! A* }9 t; V8 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& L: e2 d5 h0 p# C to_str("in docking station: \"",?.~.name,"\"")); ( H6 E" q, O/ q8 s& n s$ v
end;
, K/ K9 v3 ~1 k. x. z% i else
" A* @8 U7 F/ ^ @.Destination := assignLObj[1,row];2 N; m0 K+ B+ W: A) ?* \. q
end; & [" a' J. o2 e1 }+ y- h3 K R p4 O
newDirection(@);# E* [7 h: k6 X. X* k5 O2 s
@.HasOrder := true;$ R, X8 w% z2 s9 i6 }* q* @' p
end;# w9 A+ A6 P/ q/ ?
end;( J* O" q/ h. ^% x
end; -- of the method
* c: {, U& ?5 j9 s; i K |