/* called by: entrance ctrl of the object 'track'5 V* W* v6 a6 h" k8 i! m
*/" w! J8 J4 v% H0 H; U9 T C
is
3 D) ]4 `. G3 t }# `2 k4 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ G% t' ^# Q& \4 p5 j. k" ndo
" P4 ?7 U3 {- R: i Lan := rootfolder.Internal.Tools.AOLlanguage;3 L& D+ d! @$ r& P; P
if current = @.Destination -- else return$ x# U6 M9 a& n
then& D, }6 E& X8 B/ E3 v( A; }. j
@.Destination := void;
) h0 s' ~* T9 S; W3 M if @.occupied then2 D% Q7 J. Q" B1 J' [* v; ]. i
part := @.cont;& b6 P3 k8 y8 M8 L; {
@.transpOrder := void;
& w6 t3 m. T. {! [) X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ C+ T- J0 S+ z
@,root.eventcontroller.simTime);
& `% t' T5 O% w8 a% S. \7 G @.HasOrder := false;+ N9 f- J2 t& g4 d; Z# p
@.DrivingHome := true;
2 f7 h4 {; F2 s; I3 W# g8 G4 I+ ^' z3 z& @ rgManager.tryToStartTransOrder;6 @; D+ i5 a5 [
if @.Destination = void! i: y, J4 i/ v- D
then -- no transport order for vehicle @
2 J# w, E7 M* Z B6 \ @.Destination :=& S3 L: A, z" u* l: s6 t
rgManager.nearestFreeStation(@,track.~);
' |) l3 g8 K3 t+ R5 n% ^( p8 x newDirection(@); & P* Q; b$ t S/ b; [
if @.Destination /= void then
. c8 d/ h$ x: C3 t @.Destination.NumReservation :=
/ c9 R7 W7 R' I, Y8 Z @.Destination.NumReservation + 1;
7 y1 h$ d7 I) V$ o+ R" ]' j end;
/ l) V n- e0 p/ g @.CurrIcon := "drivingHome";
# V5 C8 o5 O* g! n+ z! V @.DrivingHome := true;
% k u! F1 y" _7 c) `. E! c4 ]) h end;
0 s+ j+ p2 @2 j6 D5 j" Q5 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station. A; {- Q& {9 g( k( k; t0 P
part := @.transpOrder;, n. w/ W8 n5 b1 A2 R* ^
part.move(@);-- load part
2 E3 f* K, e9 q5 A9 |2 u* { @.CurrIcon := "load";/ c' l/ E2 T7 _) J0 r0 K: q
GlobalDistObj := part.globDestination;6 x+ g& j5 [3 P1 C$ j& Y
assignLObj := rgmanager.rgAssignL;
; }4 ~/ X9 ^) m( b" G row := assignLObj.getRowNo(GlobalDistObj);
0 {) p5 a) `8 b2 x) } if Row = -1 then -- since 702 F( ~$ n) d! |, v5 a6 `. ?
if lan=1 then
. C& i$ v& {8 L& ^6 Y; `) T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 i, n1 w& ?$ b, J1 w3 T to_str("in der Andockstation: \"",?.~.name,"\""));- U1 q6 o9 y2 ]# t
else( l. s1 F3 n% r4 V1 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 `( H' s- F" x! u# k to_str("in docking station: \"",?.~.name,"\"")); 5 p2 g/ R# T% L+ C- [
end;$ ^9 r9 N$ n& D; x# U+ h
else6 B9 b, p7 ]7 v9 u5 U0 \
@.Destination := assignLObj[1,row];
* y: z6 u7 E" g9 ]1 p' k( b end; ( a; ?# R1 }' O5 u' p. \5 m% U V: b
newDirection(@);$ m( o% D$ x' U5 E6 W9 M
@.HasOrder := true;7 k$ s# B( Q, ~$ E, y1 Q- m4 d
end;. W8 E/ U, w0 y. A9 [
end;/ F3 o- T" I! k
end; -- of the method
+ x: Y9 O- S0 {8 |* d: Y8 A |