/* called by: entrance ctrl of the object 'track'
& M. t5 d/ O8 {*/# B/ s' D. o) b$ k1 \ j
is
- P" n6 e. K) O: ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' D$ O6 W. q+ F2 ado' U% e" P1 e; M& [' d
Lan := rootfolder.Internal.Tools.AOLlanguage;
( b3 \8 n, n. I( p n' u if current = @.Destination -- else return
6 K. O% r. I) R4 A$ l+ p then+ D9 v8 Y. ]8 i5 w8 D
@.Destination := void;! f5 D0 c5 P$ W/ Y! T3 P
if @.occupied then
+ c5 d0 ^4 ~3 \* E V part := @.cont;% x0 Y" Q6 w, h( \- _
@.transpOrder := void;
- @% d7 Y& Q0 `) _ M/ D, o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 E( m' x" I; b5 o7 | @,root.eventcontroller.simTime);
7 R9 M; l. Y* [9 |, y5 ^+ n# q @.HasOrder := false;
0 L7 y' U/ M2 {+ z! Y. o @.DrivingHome := true;
" p8 F6 N1 r/ v: O rgManager.tryToStartTransOrder; T8 a) b: L$ }1 Y
if @.Destination = void
# x/ B- @9 e ?, G: u/ O+ e% O then -- no transport order for vehicle @
8 y0 F( I' ]2 b2 I) L6 l& T @.Destination :=
1 j0 k3 B0 V& P4 t& j rgManager.nearestFreeStation(@,track.~);
/ q: |1 L- o6 H* [6 S newDirection(@); 8 G$ B1 b: W4 i4 A' o) X: S8 d
if @.Destination /= void then
$ P! q* g! F; U" O @.Destination.NumReservation :=1 E- \& ^0 a, c! b
@.Destination.NumReservation + 1;
1 {5 h- G4 A% q4 F, d$ \- s1 W end;( [4 S) _& P/ I+ x0 `* R/ a$ {
@.CurrIcon := "drivingHome";0 q3 ^* v) d `# s8 q% Q: M; P
@.DrivingHome := true;
- S& D: q. S2 a ] end;
( D9 z5 G5 ^/ W) T7 D8 w* {2 C else -- the vehicle @ is empty, both vehicle and part are in the same dock station a1 \6 \/ I0 [- L( T. W6 L! m. s; e
part := @.transpOrder;% `7 ?& c# l: X4 u1 H
part.move(@);-- load part
4 C) u3 {& {2 ?/ ^( t. N1 N @.CurrIcon := "load";9 {% h& F/ p5 Q( X* H
GlobalDistObj := part.globDestination;
. c% i3 I, l3 ?( Z g$ v assignLObj := rgmanager.rgAssignL;
- b( v. V, b7 l row := assignLObj.getRowNo(GlobalDistObj);
2 I3 g( |1 g N; Q% A+ P6 K if Row = -1 then -- since 70
6 H+ u2 k* [# X6 N d8 z' ^ if lan=1 then
/ B7 D. F: d0 |3 N. ?' [- a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- S; M8 u" q- i. U2 f# f9 v- W
to_str("in der Andockstation: \"",?.~.name,"\""));
( s2 L6 p' b$ D# m( Q else" T( J- ~9 e3 l. N, g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 W7 ]* S+ B$ S to_str("in docking station: \"",?.~.name,"\"")); - h; c f# k" a+ ]4 V5 }% m% w {
end;! a- g( A# Y/ z8 K6 M* _
else2 B1 c6 |/ E# R, |6 _5 U+ t
@.Destination := assignLObj[1,row];
9 }3 Z D6 |/ ?. G" I; ~8 @5 ? end; 5 o9 @ _7 G/ ]5 N
newDirection(@);
. F- M+ H2 {* R5 O/ h& ? @.HasOrder := true;
: \- y3 ^. o% \; r) e5 d* a! z end;/ a4 l2 C$ I& O; l1 a
end;8 y3 x' k. [# w- Q* k* e' U7 d
end; -- of the method; j6 V7 y: I* N' r" D
|