/* called by: entrance ctrl of the object 'track' I X0 L. z& Z2 E
*/
" n* S' Y- i0 c6 M' Lis
5 a4 Z' R& e9 c2 k, T Y% g$ D( g part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) e' g1 L6 L* [do5 n; f/ }$ x! v- ~
Lan := rootfolder.Internal.Tools.AOLlanguage;: W# \+ j5 r: x$ k8 c# [0 V- _
if current = @.Destination -- else return
2 ], E! E% @1 |5 o) q m5 A then
3 C4 V6 f$ P5 Q& O1 ^* R @.Destination := void;& r% [3 _! U8 b; A$ ? _% }, L: V$ Q
if @.occupied then# {+ W4 h+ p* d7 O7 T
part := @.cont;
6 E8 Z/ {7 P/ T1 j p @.transpOrder := void;
H- P! M$ ~' E2 Q8 [% y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- i8 d( Q5 z. a/ O& Y1 v6 `# i% V
@,root.eventcontroller.simTime);
0 ]& m3 @+ }; ^1 j8 z4 ] @.HasOrder := false;; g3 P$ s6 }2 _
@.DrivingHome := true;8 ` L/ G e# A5 c2 l5 i" L
rgManager.tryToStartTransOrder;+ `7 W* P/ z/ X9 y) `! z
if @.Destination = void
" O" y' H3 A) v1 B3 Z then -- no transport order for vehicle @$ Q. b) e" p7 @& D! \9 f1 `
@.Destination :=
* t0 \% b( Y& [" f rgManager.nearestFreeStation(@,track.~);/ G9 B$ v M5 F2 @
newDirection(@); - o1 [7 x# U+ v6 ]! e/ T% N- U
if @.Destination /= void then8 f: z9 F9 W$ T$ ~
@.Destination.NumReservation :=' ?/ i3 a( m& Z& w4 G1 n7 x/ i
@.Destination.NumReservation + 1;
v& X" V) u+ n1 o; a+ n end;/ m n+ f( L, C& I
@.CurrIcon := "drivingHome";% S$ E3 E2 H& v9 A2 p
@.DrivingHome := true;; l1 ^8 L+ R" _ a2 A8 ?
end;
s2 w8 `: Q4 b. V$ @, ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 h6 ?2 j: L7 U2 Q% U; F
part := @.transpOrder;
- t: I v0 u; U9 n+ x part.move(@);-- load part/ s6 D; y* K, Y+ j, w
@.CurrIcon := "load";0 a" y7 O Z4 {7 t e1 \& H$ O
GlobalDistObj := part.globDestination;) L" e1 Q" B9 \2 n
assignLObj := rgmanager.rgAssignL;9 x' Q! H! q$ v# S8 x
row := assignLObj.getRowNo(GlobalDistObj);
8 s4 m/ v( [/ @0 q6 R1 a7 p3 V if Row = -1 then -- since 70! i F' F, V3 e
if lan=1 then/ b/ n' B1 k8 O6 m. x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ o6 J0 \5 K* a2 X A$ \7 H# p" I
to_str("in der Andockstation: \"",?.~.name,"\""));0 T! R v' T H( l" m. q# Q
else
3 S- a/ l9 P6 Z% i @" D; R; V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% Z; G' R3 | ~( c2 t3 n1 f$ i to_str("in docking station: \"",?.~.name,"\"")); # H) K6 w$ C1 s2 n4 ?- C& x! ~8 ]
end;# D: @" X4 K3 m% ]8 r$ O) A( D
else; l0 E+ K& H" n) H% Q2 Q. ~
@.Destination := assignLObj[1,row];
|$ _& i. `8 | end; 0 S) ^ {# Q- I7 `1 x/ \
newDirection(@);
, O) ]& a% y4 S7 L$ O0 I& t @.HasOrder := true;8 d \# \3 d1 j7 {" z1 @
end; l8 V7 j8 v5 a
end;
; |: g4 S8 i# P7 Y, hend; -- of the method
* i9 c" ]& H X# K3 A |