/* called by: entrance ctrl of the object 'track'
' J% N/ E% \' M4 V*/
9 R! R8 K- W; j9 W7 e5 b$ {is9 L. O) E. C% ~, H" z& n- }3 T7 c1 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 p% q9 W* @/ S' {, ]do& S3 q, _* |; b5 p8 _! H9 b5 i) Z+ G
Lan := rootfolder.Internal.Tools.AOLlanguage;% m/ ~! y; n T, M# z/ B7 J
if current = @.Destination -- else return- v" Q2 i+ o# e9 u( D0 c: d1 |
then5 p0 D9 R2 s& M, k) a9 N
@.Destination := void;* E$ x) U9 ^7 I# _! F$ O
if @.occupied then
6 m: r9 `' |1 e2 V3 }& p part := @.cont;
) g) N$ x: B8 I2 w. Z @.transpOrder := void;/ c( y9 [, h t5 q! G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# F+ @! B0 E$ ?+ q
@,root.eventcontroller.simTime);
# t2 V- ]- `3 K- G7 p7 N- m @.HasOrder := false;" I5 J% ?, U, ^! Z& [: ] h
@.DrivingHome := true;
# Y- Z# W$ q* U rgManager.tryToStartTransOrder;
3 I9 K7 J5 y3 N: ^$ f% A if @.Destination = void: F2 T5 `, ]: n
then -- no transport order for vehicle @; N2 c) ~' ~$ `+ q { l6 {6 p; C
@.Destination :=
( v/ F# W( t- d( |' ?6 Q rgManager.nearestFreeStation(@,track.~);' S" l+ l" g+ h$ X6 W
newDirection(@);
" L1 Z5 @2 T! O/ c if @.Destination /= void then
3 ]8 j5 ?" h) n; v# Q @.Destination.NumReservation :=
3 U' W: u; `; z9 Y9 x5 T @.Destination.NumReservation + 1; f- G) D5 e0 e% |3 m) V8 T# @
end;4 ]1 C/ R6 a$ r' K
@.CurrIcon := "drivingHome";5 R$ x: D0 n. W+ E" S& G+ f6 Q4 e
@.DrivingHome := true;% U" c1 w- D; u) Z
end;/ Y! g9 p* l; ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 t9 G/ `3 A2 [+ f1 O
part := @.transpOrder;6 t* P6 K/ K- j' v4 s4 |
part.move(@);-- load part j* j9 J$ S' H" F3 @) n& D
@.CurrIcon := "load";8 G" B* i$ w9 ?# b
GlobalDistObj := part.globDestination;
( Q+ A$ A& M4 _8 u1 i3 H assignLObj := rgmanager.rgAssignL;+ r! M4 a- n2 T1 j& @+ m2 {
row := assignLObj.getRowNo(GlobalDistObj);3 U7 o5 l4 C3 L
if Row = -1 then -- since 704 L( O1 x. t; ?- B
if lan=1 then
; g( S3 L$ |3 E& ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. }/ D4 J" d. X: G2 l6 ~5 }$ H
to_str("in der Andockstation: \"",?.~.name,"\""));! d, r1 y7 X) s1 t# w# b* L6 I
else
% {( J+ C) V0 A w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% x- K) p3 _; G0 }
to_str("in docking station: \"",?.~.name,"\""));
1 s( n3 S2 m* g+ D. {5 _/ E end;
- f3 C* T. p7 e! g else
/ j- P0 h; {6 b, U: H$ U @.Destination := assignLObj[1,row];. o8 p/ `$ S" z+ H$ \' {! ?2 z
end;
+ Q. H" y, l4 Z+ t( {* Z newDirection(@);
9 x1 c8 K2 B3 W. t4 _4 r8 R @.HasOrder := true;
8 V4 L p+ ?( D! ~7 ~ end;
: k" s6 _+ Z" E' M& O! `5 }- m; D( ] end;5 O f$ |) F9 a; L5 Z. R
end; -- of the method# T" G8 F: r; P6 D& Z+ u! E! P+ H
|