/* called by: entrance ctrl of the object 'track'. r: g( R; s6 S# G) d' G& f
*/
T# g3 p6 o9 a# ?2 S, mis' _0 I& }2 h8 ^: E8 t% r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 r( F$ @8 Z8 }+ Ndo j* j ]9 z: K w
Lan := rootfolder.Internal.Tools.AOLlanguage;, I1 x% g# B! i
if current = @.Destination -- else return
( k+ B: F# }( Z then( c3 n1 N1 A5 J) x1 C7 j8 y
@.Destination := void;
' B6 u2 Y1 s' c F. `5 I if @.occupied then8 ?. r( T `$ ~% o& j
part := @.cont;5 t" d' ^- y: ~5 E" l( t" Q h
@.transpOrder := void;
6 Q L" B i" E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 F; O3 x+ y4 z+ ^; M @,root.eventcontroller.simTime);7 Q% a) m. r1 h5 y! q# b
@.HasOrder := false;0 ^. Q, e0 o8 P$ m0 I# q
@.DrivingHome := true;1 l' j/ Y9 ?% t7 T
rgManager.tryToStartTransOrder;* v# G% U9 d2 R+ d: @
if @.Destination = void
8 w6 \ t' @* D2 j; G then -- no transport order for vehicle @
) _& O* x6 U7 M& ] @.Destination :=
- a; J+ h5 l& J rgManager.nearestFreeStation(@,track.~); v2 t$ z# A. @5 d+ z
newDirection(@);
4 k3 V9 `. Z' Y5 v6 O2 O) M if @.Destination /= void then1 @1 M4 s- z+ U, K y4 V( H, B
@.Destination.NumReservation :=
1 m8 R0 M0 K1 J# H& ` @.Destination.NumReservation + 1;
! D+ c/ }2 {$ s: u! ]# C! o( i, x end;5 M+ D# P- e$ U& U7 G
@.CurrIcon := "drivingHome";
: l2 N# o1 e: S) L g) Q @.DrivingHome := true;
; B$ L h. Q# y& s2 I7 [ end;( Y2 ?8 b5 @( b! ?/ ]" _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 A" K. Q; { z h; b/ B
part := @.transpOrder;" C. J7 F! @9 K7 w5 w. k; c' l* f
part.move(@);-- load part
; h# ^+ n8 L! q @.CurrIcon := "load";
7 K6 b: f% `4 O, q6 s GlobalDistObj := part.globDestination;2 z' @9 p+ }. e1 I
assignLObj := rgmanager.rgAssignL;
# l. K# X( Y* c2 G/ O+ K4 U row := assignLObj.getRowNo(GlobalDistObj);; F D9 P) e% I. ?: v$ ?7 o
if Row = -1 then -- since 70; @* p* H. b/ q) @3 V, ^, h3 {
if lan=1 then& e; b5 Y/ x$ m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 _, G8 \% ]: `3 a" s0 O to_str("in der Andockstation: \"",?.~.name,"\""));
) w1 X2 e+ C% ?4 s& v8 t+ K0 t else- o/ S% o' j6 |' h; ~8 w- \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; A' {2 `$ q/ k! q F; A
to_str("in docking station: \"",?.~.name,"\"")); , Z1 m" N* u& r0 c0 s9 Y1 A
end;
) G$ ?1 }: B. o else6 n& z T6 t. v/ ]. ?) P
@.Destination := assignLObj[1,row];
: O0 l* L% F0 G( T end; 0 Z: \8 L4 ?/ v
newDirection(@);2 |- e0 W& Z/ {* U9 s
@.HasOrder := true;
) G0 [6 q" J7 } end;) z$ Y/ C: u0 b D3 E: [
end;
% G- p9 I8 n* q F5 ^0 }* g! |end; -- of the method
" `) v( w+ U7 Q0 ^! C |