/* called by: entrance ctrl of the object 'track'
+ d- w4 l2 f" ?2 O*/' _+ G$ ]# r0 o' {' C
is
1 r3 _2 h% Q& j9 h( P+ S part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 P/ ^; R: G+ C* J" c. N
do
1 a7 P, X0 m/ e Lan := rootfolder.Internal.Tools.AOLlanguage;
; P( n- w7 Z: C2 A7 e1 k if current = @.Destination -- else return
% h: J5 A) u( \. ^# q/ p$ o+ J8 C then
: e* [ _* V& t' H8 J5 ~ @.Destination := void;
1 Z9 `9 L2 @ R7 Z, S) V' a if @.occupied then
/ t" C: _8 A& D( i ] part := @.cont;/ p f! t) C* ]1 c
@.transpOrder := void;8 l( u4 B/ l0 w4 u$ v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: C1 r @% K1 ] @,root.eventcontroller.simTime);
|) l& d0 J8 B5 `4 L2 R @.HasOrder := false;
0 f+ W6 P4 f0 `" ~& O/ ?6 ~ @.DrivingHome := true;3 O; `+ ]' _" H0 f" c- ?% [
rgManager.tryToStartTransOrder;
' e; F( s& \/ N2 v' s if @.Destination = void8 p# x, o, M7 V/ w$ z
then -- no transport order for vehicle @4 E, Q; w- u$ u* x# _, `" r7 C9 y
@.Destination :=
) O3 z! f2 M P6 ?0 W- t rgManager.nearestFreeStation(@,track.~);- T" w8 U$ r3 s2 w+ x/ J+ a9 v2 Q
newDirection(@); 3 I r, t' q4 k! D, O
if @.Destination /= void then7 j6 k$ h1 O" @
@.Destination.NumReservation :=
# g& H. B( w# J @.Destination.NumReservation + 1;
! N0 |& y; r0 W# H$ [ end;3 F1 e7 g( w! {9 L- e+ ?$ G
@.CurrIcon := "drivingHome";
6 F! }" N6 \, \* y' {: R @.DrivingHome := true;$ F7 ^" ~( ^ R! Y& U
end;
' q1 H$ Z: |( g% m# o# E7 d' n% f else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 q# M: U- S, T2 H8 K7 u1 Y& q/ ]
part := @.transpOrder;
5 o% f. h. l8 b$ t part.move(@);-- load part' L& }: j! T' }, K( r3 S
@.CurrIcon := "load";) p8 {6 I3 \) M( T6 p) P
GlobalDistObj := part.globDestination;
) g% T K0 S% ]/ u) I' k$ ?' W$ {2 O! n assignLObj := rgmanager.rgAssignL;
! @( h- w! v, Q2 [$ I7 L; x row := assignLObj.getRowNo(GlobalDistObj);. g5 x; M5 X7 N$ `$ H3 g
if Row = -1 then -- since 70* a9 s/ R% \+ P- t# s! y$ r( }
if lan=1 then$ a+ O2 E& I' u% H' i6 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 r" O3 c, k2 E6 q/ n to_str("in der Andockstation: \"",?.~.name,"\""));* T5 L9 l6 }$ T0 b
else
" d' P- n0 l' K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 H( R/ X; @7 X5 a- Y to_str("in docking station: \"",?.~.name,"\""));
! H0 n; C- H; z; d1 j. k end;
5 ?# k8 j0 o4 Z; S' C else; H1 Y5 Q! y( O( q# o1 J
@.Destination := assignLObj[1,row];
2 B1 O* r/ o$ X0 Z, y/ e end;
! E5 N% _9 H- T0 g3 j newDirection(@);
* }: M h- v4 d4 ?! E @.HasOrder := true;
0 o0 U. {) i( X4 A: T b- L end;
# f/ k$ v! n+ _9 x end;- z/ H! z0 m2 @- u0 d
end; -- of the method
/ z. `* P# m& R1 d3 L9 b) |6 @ |