/* called by: entrance ctrl of the object 'track'
$ p s. k4 t4 z3 h. A*/
1 P: @4 d- ?+ S( his! V( @& m0 e# U, _5 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. {$ \) M7 q7 @8 N( s3 N
do
7 f: Q2 r( K) h' N; Z Lan := rootfolder.Internal.Tools.AOLlanguage;
- {) Y2 b% b6 N if current = @.Destination -- else return
, r! h# r. ]* f3 y4 z then# _) m( `( c+ |& O! y
@.Destination := void;
; X( M% v0 I* o if @.occupied then1 Z2 Q$ t( g8 S/ b
part := @.cont;
; o0 k' f! X& r; ` U8 o @.transpOrder := void;) n' a* Y7 Y# y# P! [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, i9 s W2 e4 [) E h( U @,root.eventcontroller.simTime);
: k9 G' i6 I, o @.HasOrder := false;
; I9 O1 r. v- D3 ` @.DrivingHome := true;
& ~/ y3 B- @, l* J6 | rgManager.tryToStartTransOrder;& S; |. H% ]3 }
if @.Destination = void
( K p( c+ e& ]7 {! P7 r) ^ then -- no transport order for vehicle @5 n" K6 W: s5 K0 `6 i$ g( q
@.Destination :=
( x; D% {# F* g/ D# F rgManager.nearestFreeStation(@,track.~);. y5 a9 z) h6 C a2 h7 t1 J$ L
newDirection(@); 1 Q' o9 _8 }; e" [* o
if @.Destination /= void then
& l- h' M ~; t) e d @.Destination.NumReservation :=, s; e" c9 t/ T7 \4 C; q/ ?
@.Destination.NumReservation + 1;
U; _$ r- r% j, K+ S2 l end;
- L: s& H+ |2 W0 Y- ~: i1 R @.CurrIcon := "drivingHome";
: M" H9 s+ c" }! U @.DrivingHome := true;
. v" ^# |4 J/ S0 Y- Z6 k end;5 [- L A, Z+ V: `8 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ y8 {. Q* t& K- Y7 B5 b% V) n part := @.transpOrder;5 Y3 L0 V2 [3 \+ o
part.move(@);-- load part! C8 j$ h$ g3 S* j, H
@.CurrIcon := "load";6 t) a% s4 Z; u: o4 |
GlobalDistObj := part.globDestination;
0 V; v' ~, W0 |: N assignLObj := rgmanager.rgAssignL;- _) n" i& N7 f$ x+ [
row := assignLObj.getRowNo(GlobalDistObj);' [% S, W- {2 k! y# l( U+ ?- X3 a
if Row = -1 then -- since 70
. c V- F7 e ^; a( C if lan=1 then( Y# @# y0 u3 f. u1 E3 _/ Q/ u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. O1 C+ V: `7 c' t) r to_str("in der Andockstation: \"",?.~.name,"\""));+ k: k. k5 g b* i
else
5 d; N' G0 {6 q6 f) _3 m7 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" z* \9 X5 ]& h# f to_str("in docking station: \"",?.~.name,"\"")); % V, c! y5 W) `1 a9 \: W
end;1 X: G/ \( l& i* m& K
else ^% Z* E! q% a: l
@.Destination := assignLObj[1,row];4 ?* G C) |" o
end;
$ n; v( K1 [$ g' p$ ^8 ^ newDirection(@);
2 o- N/ Q$ M* B% M' N @.HasOrder := true;
- B; u& Z; [/ }3 O8 U; q: q0 Z' r: _ end;
% j* t( @7 F: m$ G! i5 P end;
5 G1 a# M; L9 B7 {. |5 y# ~end; -- of the method
) m) d2 q+ ^3 H( g2 g+ U9 | |