/* called by: entrance ctrl of the object 'track': [9 A( [4 D1 E' p3 O# n
*/9 e$ t/ p- _2 j
is
7 _+ t3 W: v8 c/ |, A# i part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 e$ x6 T/ I3 Y; v
do/ H; N1 G8 ~1 b0 l: }0 H2 F3 B/ m
Lan := rootfolder.Internal.Tools.AOLlanguage;
% |9 A/ } V4 C4 i9 e if current = @.Destination -- else return
" g, Z" M* T' D x6 O/ F1 q then
k3 ?$ l1 \9 \: C' s: a( J$ ~; ` @.Destination := void;
6 S1 {" Q. k L* S! c) v if @.occupied then0 a" J6 f4 z6 G5 q/ G
part := @.cont;0 f$ L$ E$ b4 H4 S
@.transpOrder := void;
$ n0 L, m) H) Y) ~( N J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& d) r# T# ]# z) g @,root.eventcontroller.simTime);
8 k& E+ @6 ^. L+ ^ @.HasOrder := false;
4 P& G. i* r! H. O1 q! g @.DrivingHome := true;
6 _& M% c, n$ P* H rgManager.tryToStartTransOrder;
& j& _$ |3 @% N- F' y) d* N if @.Destination = void
7 U3 f5 Q* a/ q' A: s( K& l8 v0 q then -- no transport order for vehicle @! R, o8 J5 u( Y1 T& L% c, a0 ^6 B; b' N
@.Destination :=8 T) ]1 }& f% z% I1 u! `
rgManager.nearestFreeStation(@,track.~);
0 v! \9 V9 j6 K/ A newDirection(@);
; q3 X% T! f3 _ j0 h2 ?1 \, t if @.Destination /= void then
% C1 l! t% L. m- a! c* m @.Destination.NumReservation :=
8 ^& v0 s$ Z0 z# {6 E5 H* O @.Destination.NumReservation + 1;
6 \' b% x8 p/ q, A" `& o end;+ Y- x) g7 p4 F; x0 P
@.CurrIcon := "drivingHome";
" G2 S( O$ t5 O1 X) }; g @.DrivingHome := true;
1 t% e+ Z( J' L& {. W: T end;; G- c1 g6 B8 [: w9 L$ w1 P D' R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% g+ r! N" ?/ x, u( V" F+ e! g
part := @.transpOrder;
7 W9 b' i$ q6 i part.move(@);-- load part
1 d2 l+ m7 ~4 h2 l @.CurrIcon := "load";
5 [& J3 p( `7 v* p' p GlobalDistObj := part.globDestination;
6 a' _, X" ?4 R7 V6 R5 f assignLObj := rgmanager.rgAssignL;
& p8 N( E. a* t" [: ~. V* t& h; G row := assignLObj.getRowNo(GlobalDistObj);& \3 N7 w- i" i% \' O# j
if Row = -1 then -- since 709 e; w: p# P) |1 W+ k8 z0 ~& A
if lan=1 then
: g, ^* K2 Q6 K$ B) O/ V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, p" K9 U* n: [, f" p
to_str("in der Andockstation: \"",?.~.name,"\""));" E) e3 S* N- }$ ^5 {5 `. _
else
7 T" D# C" g b8 j: @( o: I# r1 o+ s ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), a. D' Q' l$ q1 i$ t3 b$ d5 }: q
to_str("in docking station: \"",?.~.name,"\"")); . B- U( a0 F; `, Y+ H0 T3 e
end;2 R4 U# t/ K* ~& V* G$ j8 `$ x6 c
else$ p W9 `; N4 f: q& ?7 D
@.Destination := assignLObj[1,row];
, `- c) C- I5 e6 L1 P* d8 A end;
6 B+ w6 V& A+ W9 } newDirection(@);
- U: A5 g1 u! N: w @.HasOrder := true;/ ^* ?* u# ?$ o. l' ^1 G$ d F" v: s' q
end;
4 C7 v5 c _9 C$ F+ L3 ] end;
# i& D* R) m. I* U! Send; -- of the method
; h( I! c" O3 K: O) ]% f |