/* called by: entrance ctrl of the object 'track'/ S& f% p4 \% R6 q" ]/ _
*/' B! j/ J2 q" Y" s# k
is
5 ~3 b% R3 g/ N+ A* A, M, n part, GlobalDistObj, assignLObj:object;row,Lan:integer;# c+ J' K# t, Y8 R
do
. y l1 A B* w! N% z0 N Lan := rootfolder.Internal.Tools.AOLlanguage;5 V- m `. C# V7 o" p7 v0 U
if current = @.Destination -- else return
% i' n7 c3 @4 Y8 T$ k( y; A: I then2 N' m5 c f' F W2 N2 ~
@.Destination := void;
) q. \( v% t e/ r6 O7 b r( b if @.occupied then
1 b: j' O9 T1 M6 v' J( a part := @.cont;- @* E3 f7 R9 e) N! D+ J
@.transpOrder := void;
9 ~, q( s/ W+ z/ N# q2 D u% T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ C$ L0 H2 b4 S- b
@,root.eventcontroller.simTime);
9 W" a3 r8 F) {- W* } @.HasOrder := false;
' M' R+ S. Q- m" l7 Z @.DrivingHome := true;
# p$ n6 z8 K/ Q& D9 b& ]1 L& A" N rgManager.tryToStartTransOrder;
/ e! ~5 x$ C3 o; D if @.Destination = void: N2 J# U1 F% m4 k
then -- no transport order for vehicle @
5 O6 a9 R3 R" Y& T) b @.Destination :=( a9 G4 e$ i/ k, z. |2 N
rgManager.nearestFreeStation(@,track.~);
0 T" I& ]; A' j, y" r newDirection(@); 5 n* ?- B7 s' V9 P# [9 S
if @.Destination /= void then
0 ~# D" R- u0 D; n3 p @.Destination.NumReservation :=! H1 p* [4 t ~3 c& ~3 w9 P
@.Destination.NumReservation + 1;8 N$ U( u x; Z$ W
end;
- |- n/ g/ I. T$ J) K R @.CurrIcon := "drivingHome";
+ o3 a1 t- ~8 a$ O2 w$ C @.DrivingHome := true;
9 G6 b7 G! |8 h1 q* c% |5 T end;. a) `6 h+ ~ s5 i7 l" e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- B+ [# x# z: J! J
part := @.transpOrder;
, b3 V" }% n' j part.move(@);-- load part
; F* F5 }2 {- U# b y* p2 T8 T/ s @.CurrIcon := "load";+ h2 H: L7 e$ u- n/ Z6 W
GlobalDistObj := part.globDestination;7 N2 g: ^+ j6 N- z
assignLObj := rgmanager.rgAssignL;
7 U. m2 I& T! R$ S" i row := assignLObj.getRowNo(GlobalDistObj);: o% |1 D, r4 A% ^- V
if Row = -1 then -- since 70
, L. O1 g& c9 Y if lan=1 then9 Y4 |5 H2 B2 N; k% }% y" c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 D. _# w, Q1 n% o0 V9 g
to_str("in der Andockstation: \"",?.~.name,"\""));
9 F; f/ T9 w; M' L1 Y$ i% W! ?1 ~ else
/ d1 Z0 U- p8 M, M) E2 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 |1 M$ i; g. ?7 [ to_str("in docking station: \"",?.~.name,"\"")); & S. d3 ^: k' e2 a/ s
end;
/ i7 a- [! J5 `) b8 B, Z% V2 ` else
@! ~4 G. C9 J: ~, |" A" _ @.Destination := assignLObj[1,row];
) B1 g+ Y# p1 C end; 0 u/ s3 a9 u" L9 [2 z
newDirection(@);
1 ]5 o7 c' Z& s K/ U! A @.HasOrder := true;
5 h. K x" T0 D$ P9 G end;& l# f( v+ o2 i1 t
end;+ I; B3 I# ]( Y2 Q! K: m8 \; W
end; -- of the method. Y2 J- X: W/ i. S' N: Q% y
|