/* called by: entrance ctrl of the object 'track'4 Y G. |% _5 _6 H- q9 `
*/% |) Q2 ?1 }, N! `
is
4 w5 b. V4 |% Q. U' t part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ k8 j9 q* O" a0 I7 G
do
( c9 H, m- B' P3 ], P Lan := rootfolder.Internal.Tools.AOLlanguage;1 {5 I- m! U- |, e
if current = @.Destination -- else return
5 S+ U. ?/ L4 a9 b then3 K9 X: s, R/ `, j& c$ i5 m
@.Destination := void;
: x6 R" G$ o. E/ x if @.occupied then
/ y+ z$ k4 Q+ B* A3 E/ z part := @.cont;
8 V2 K) V2 E; ^+ y# b9 P' `( g3 N @.transpOrder := void;+ t- m0 `- D4 L3 s$ u9 |1 p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; l: \/ ~; Z) M- a2 r @,root.eventcontroller.simTime);
2 {* u% N4 n( C( N- d @.HasOrder := false;
% c* W2 n( a, s$ M) y1 O$ E @.DrivingHome := true;
( \7 n! A1 Q+ |/ B9 A9 l0 v9 H rgManager.tryToStartTransOrder;
1 _ M* F& l) B6 O4 N0 t, G! a5 c( i if @.Destination = void7 f% A+ S* v) h
then -- no transport order for vehicle @* K; E" w4 e+ y
@.Destination :=+ g* u6 o" P+ ^9 \
rgManager.nearestFreeStation(@,track.~);9 s; b6 P2 v, L9 ~& V! C* V! L( P
newDirection(@);
5 I! q3 n2 [: q8 b1 l! t9 H" d. Z if @.Destination /= void then
& }9 \6 E% L/ M z7 g @.Destination.NumReservation :=" x2 l2 @8 m" ?4 L9 c/ |
@.Destination.NumReservation + 1;
! P3 l. r5 q$ q end;
1 D5 P' |0 G! b5 f3 F8 ?3 r @.CurrIcon := "drivingHome";1 p1 K! o# M0 W3 R1 m/ `
@.DrivingHome := true;/ @7 R, Q- q* A) i- Y# n
end;) a, L6 T9 P* H3 `$ x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ L* T" I/ s# {! J( K part := @.transpOrder;9 ^. U7 Q% K0 S. a
part.move(@);-- load part2 c: c. c& v7 P. `5 o( ^, u( K1 H
@.CurrIcon := "load";
}; Z) Q9 o+ A' } GlobalDistObj := part.globDestination;: m% J) {$ S4 \5 x4 C6 k
assignLObj := rgmanager.rgAssignL;
0 C) n$ J; L4 L+ y' C) A row := assignLObj.getRowNo(GlobalDistObj);. R1 l( b1 X% O" |# w+ a5 ]/ \
if Row = -1 then -- since 700 A4 v. P9 S* x5 Y! z
if lan=1 then
8 [; C t& q. s5 [& k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, ?; a0 a5 Y0 a' U' {
to_str("in der Andockstation: \"",?.~.name,"\""));5 Z3 z; E: g: v( N$ V) ^ G, n3 a+ S
else
0 V* l. A, K- B, |+ ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 K* t1 g' M4 G* w) j/ E' R to_str("in docking station: \"",?.~.name,"\"")); % I0 O ^: P6 ?5 T; {
end;+ f! Q! ]9 T9 \; H$ P
else: q' a0 T( a" [' t" s5 }; G3 j, J
@.Destination := assignLObj[1,row];
5 H" C# M+ D% Q$ Q end; 3 n1 V5 E: p, Y+ g9 o& V
newDirection(@); t8 K) R1 R- t# }. r7 C# z& `2 O: m
@.HasOrder := true;5 P6 C+ T& K, w: {( C b8 X
end;
- X& X# T# U2 Z4 Z2 q. [ end;
- h- B' C. h) P6 F- K4 Hend; -- of the method
3 C% Y* J+ Y9 Q7 v! \! C6 b- t8 B |