/* called by: entrance ctrl of the object 'track'
" ?& \, o# Q. R# P8 Q- }1 r$ h' I*/
# m2 ]5 S J0 v9 Jis
- H- u8 M" D- V" t part, GlobalDistObj, assignLObj:object;row,Lan:integer;! r1 u$ d$ E- Q# t) I! B6 ~
do; Q: }1 }5 l1 X. T3 b
Lan := rootfolder.Internal.Tools.AOLlanguage; s1 v7 }, X9 e' q& _; e
if current = @.Destination -- else return4 r7 P# D! f/ f1 Y9 f
then7 B# l( F( `" c, x4 N
@.Destination := void;
6 f! h, f8 `* a1 }1 h8 Z if @.occupied then
. V* l$ V$ D* E6 T8 P$ l: D part := @.cont;, j/ }3 A0 \/ j! x$ F
@.transpOrder := void;
* s1 D0 W9 I8 J$ Z" B) M8 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 B! s. m1 g; V, W9 B6 x
@,root.eventcontroller.simTime);
5 V7 j4 K; g: P0 `# f8 u3 `8 D8 q @.HasOrder := false;: ~# u8 U7 f7 X, f" P1 N/ Y; n" c
@.DrivingHome := true;
& ^7 s$ \; h( n6 w1 @" y/ G rgManager.tryToStartTransOrder;
, l4 d, p# F5 G5 G1 A: \6 d! h. A5 o if @.Destination = void
" x/ ]2 G* B4 {3 }7 K3 v9 z" o+ C then -- no transport order for vehicle @- t) w1 q' U7 C& {5 A, j
@.Destination :=
{* s+ T" I5 t( {8 N' b# Y rgManager.nearestFreeStation(@,track.~);
0 f- C* X6 H9 x newDirection(@);
' |, B, P; }& z: L% x5 P if @.Destination /= void then
% M h M2 c& U. b0 k @.Destination.NumReservation :=- Y2 i% L2 d7 H( {( l
@.Destination.NumReservation + 1;1 p" {1 D% p$ I0 f) i9 Q8 B% H: o
end;
2 Z5 P4 K2 q& N @.CurrIcon := "drivingHome";
e: T- m8 J1 G3 h) U2 r h0 A2 y @.DrivingHome := true;
% [5 J6 W7 m6 }4 B9 t end;
) C& }2 R1 h" \4 P" L) P# p! K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. `% b+ C$ `* V6 t! o part := @.transpOrder;# l Q/ Q( t; K6 z& B
part.move(@);-- load part8 L% X3 ^' [% |7 M" `( \, I; @9 j
@.CurrIcon := "load";. m! J9 K5 Z! T3 h' J* ]
GlobalDistObj := part.globDestination;
* w5 n' t- H& A assignLObj := rgmanager.rgAssignL;3 U+ N H6 o, k- @
row := assignLObj.getRowNo(GlobalDistObj);
' _: C8 F; n% P l: H, k if Row = -1 then -- since 70
/ X4 N3 ]0 d1 D% T if lan=1 then
' h8 A. N4 `' I* W# j2 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 m. H0 l5 ]5 I8 Z- N) ?
to_str("in der Andockstation: \"",?.~.name,"\""));
2 U" o) I: B, k9 t4 z, K! ` else
+ o, Q# c# j( Y2 f7 x) i! G& ?4 U& | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
J7 Z4 w% A3 |# Y8 S to_str("in docking station: \"",?.~.name,"\"")); 7 t; J) {1 {* @# [
end;
# }/ w# p" ~5 R, K; U else' B+ F" M8 Z! b+ z- T
@.Destination := assignLObj[1,row];0 `* E. i4 D% h. s# N* W$ L
end; 8 l6 G% R& u+ P# p8 g
newDirection(@);" O3 e! C7 D6 m! Z6 j
@.HasOrder := true;* |- J5 Y$ u3 z; }% F; ?
end;
* |% Q1 Y8 t8 S end;/ G8 o% [. I$ |' w. w
end; -- of the method
- ~% [$ t! O2 ]1 h4 X# J |