/* called by: entrance ctrl of the object 'track'
. l3 e& B3 O3 B" |+ k/ s*// {3 X- ?) ~% L- M1 ` l
is0 U+ _& D$ l7 D# S% x) V& y4 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. d$ i$ ?; R: U4 l1 r3 pdo( O1 I' `+ k: q
Lan := rootfolder.Internal.Tools.AOLlanguage;5 E4 E e# F" ]/ V1 v* C# O
if current = @.Destination -- else return
. b& L% [4 Q6 a* P5 m2 n1 N then
- X( a9 Y1 u1 r( l; l @.Destination := void;
: _: z) j Y# M if @.occupied then+ S Z. ^8 i% t: H6 U+ W8 N6 k
part := @.cont;2 [; ]4 h/ U: ^! l Y; B7 }0 ]$ f
@.transpOrder := void;
! p/ i9 r4 J5 k& Y! H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 l8 n3 C; N: Z9 | @,root.eventcontroller.simTime);
/ {1 E: j# l: x @.HasOrder := false;& L% U, E, u+ \+ G2 Y+ j3 [
@.DrivingHome := true;6 Q5 z( L# |; x% ]7 N
rgManager.tryToStartTransOrder;
# c/ u: B. D$ E, A3 `) A if @.Destination = void
0 H- K. P6 Z4 e0 h then -- no transport order for vehicle @
9 G8 j% Q, J9 f% N3 I @.Destination :=. ]* \! S& y9 V6 e; h/ w/ B$ F( M: C
rgManager.nearestFreeStation(@,track.~);" B" Z* L# V2 f3 _
newDirection(@); , s5 \* [) V2 ^; p% F
if @.Destination /= void then% [! P* j" f/ j7 T& k; g
@.Destination.NumReservation :=
0 p! A$ @- T' O+ ~5 W @.Destination.NumReservation + 1;% q- X1 i) i- w+ W; L. z& |, K6 ?
end;
/ e8 ~ z# {( {: @4 V7 R$ L( U& r @.CurrIcon := "drivingHome";
) t: z* C) f9 ^2 Y1 f$ ^ @.DrivingHome := true;- ] s2 f+ {0 Q2 o& G
end;4 F0 K$ R1 M( S8 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ X0 w ^ S# V( M8 N( f part := @.transpOrder;
( k9 C- L" y1 m7 t) M# d& e part.move(@);-- load part) I- d+ Q- B( M2 }
@.CurrIcon := "load";' o9 d2 O. P2 {4 e, w
GlobalDistObj := part.globDestination;, A+ z9 G6 K3 k% K* t; l
assignLObj := rgmanager.rgAssignL;
4 `& C [5 y" R" A row := assignLObj.getRowNo(GlobalDistObj);
/ w, \- o7 f; O. ]$ t+ b8 I if Row = -1 then -- since 70* n7 y+ u1 g' i+ O1 j" r5 E; V
if lan=1 then
& S; I& I* d8 Q, E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! Q6 P. H+ K! y
to_str("in der Andockstation: \"",?.~.name,"\""));
! _# h5 u2 E+ Y2 V6 b( b# [# G else+ j2 X! Y t; {' H" w$ n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 U1 j: j1 I; o$ o
to_str("in docking station: \"",?.~.name,"\""));
* }9 w# i% A) u) f |& D3 ~4 Y end;
3 S% B9 T" H$ L& N* @' I else7 d4 a: M% j% q* ~5 H# }
@.Destination := assignLObj[1,row];
n# ^: P* t: j* h& w+ [$ U' B end; 3 X8 I- a7 D# M3 V6 n& r! H% ]! V" K
newDirection(@);/ w4 p2 {, R! Q& _3 {
@.HasOrder := true;4 V) i' J# z% `! b5 g' y
end; T! l# |& h8 V
end;
+ W9 k6 n9 c" Q4 n! `end; -- of the method
4 ]7 [! b, |6 ]; J7 } |