/* called by: entrance ctrl of the object 'track'
" M4 G, m- Q+ L) s! G*/1 b# w- p! ]# p6 u% K! G6 k/ L
is* F# x/ e9 u! {2 K2 c7 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 s; ^# `& l/ gdo5 T9 ?. C E7 O7 h& Q
Lan := rootfolder.Internal.Tools.AOLlanguage;5 L/ A+ }1 F1 }4 h
if current = @.Destination -- else return
$ R) n# x' l$ `+ n4 K+ l then
4 N. @/ F9 f4 J/ _7 [ v @.Destination := void;( d; Y) R; t) n9 u
if @.occupied then
7 @; C9 C) z8 ~ part := @.cont;( f2 d5 O0 L# j1 a( z
@.transpOrder := void;
" ^& N4 p5 K7 m) R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 n. ~$ O' f0 A& T' E! w0 y
@,root.eventcontroller.simTime);) l% n* L4 B p( z
@.HasOrder := false;% Y- r5 ?* S0 l% M
@.DrivingHome := true;
9 a4 n, ?* H. C& l+ Q rgManager.tryToStartTransOrder; x4 I d' c4 w* E$ x2 P& e
if @.Destination = void
. @: q/ O1 s4 y% B4 z then -- no transport order for vehicle @% r5 T) I' K+ R8 K: ^
@.Destination :=
; ~, S; T3 q L" \7 W* D: q& @ rgManager.nearestFreeStation(@,track.~);6 i: q6 U8 w8 x$ k
newDirection(@); 9 `$ a" w. @" F2 w& N2 s
if @.Destination /= void then( x3 J5 d' g0 ~) C
@.Destination.NumReservation :=$ a; n, \ X2 F9 B. X" k7 f
@.Destination.NumReservation + 1;
0 x" l, Z7 f2 a3 q) a- d1 ]# R end;6 k- |1 C) r0 v" C; A
@.CurrIcon := "drivingHome";6 m' |. Q5 E9 ?1 y
@.DrivingHome := true; B; B! @% L: e/ i A, e+ S
end;
1 X5 n9 `) {% o+ @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! g: t# M- c0 a, @ part := @.transpOrder;
+ l8 i$ r0 D% C3 E# p8 K part.move(@);-- load part4 O& F6 X- G. n8 e$ w
@.CurrIcon := "load";) \# @% O% _ K+ P; ]
GlobalDistObj := part.globDestination;9 m1 k( U R$ L
assignLObj := rgmanager.rgAssignL;
3 D0 V3 m6 I. b4 g/ e* i* ^ row := assignLObj.getRowNo(GlobalDistObj);
6 B% _1 U# b! X1 S: ` if Row = -1 then -- since 70( c0 e! x% W Z1 P- j( O- h3 h' C
if lan=1 then
, Q; |. ~) w' O( d K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! v& `* n9 ]' k' ~7 a
to_str("in der Andockstation: \"",?.~.name,"\""));7 @6 J9 x+ E0 S4 D7 M8 R* V
else' `" k' O7 K& @3 X4 k, s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 L" L, e) j5 O W to_str("in docking station: \"",?.~.name,"\"")); 1 k/ r. `1 b4 c) N* f# v
end;
2 x! a; ^- Z( A6 {% t& Z else% f$ h c' k# P2 s4 l
@.Destination := assignLObj[1,row];# s/ ]+ n/ @( H0 m, S
end; 5 G2 `. }' e2 k2 X
newDirection(@);
3 `! b3 I1 ] |( q, Z @.HasOrder := true;
4 K' d. Z, w* W: u5 E/ p' y! @ end;+ N, A1 g+ M! _
end;
0 G/ S- u( H% L8 R# J. j* ~end; -- of the method
+ U6 m2 s: f3 {" a |