/* called by: entrance ctrl of the object 'track'
: {7 Z( q; {6 V7 A*/
2 g: K! y9 Q: ~% Fis
& E& d5 a' ]0 g7 Z+ i7 b* _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% H' X( T. o: j$ Y% Ido
; w+ O4 |/ h0 q# J) q Lan := rootfolder.Internal.Tools.AOLlanguage;# S) t8 f; d: ^2 E* j. g' g5 N
if current = @.Destination -- else return6 R) A$ J+ d, r6 c! \
then
h( i1 P3 K! S7 A6 F. Z @.Destination := void;7 K! Y3 V! e1 g' k7 v& t( U
if @.occupied then3 j, y9 c9 z8 e3 a" G4 F( ~
part := @.cont;8 F$ V' q6 V7 u* d) S. N
@.transpOrder := void;, h4 W* l5 k; x9 Y# |2 X2 N W5 r: }- R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& D& V, _2 L2 \" `! f6 v! m
@,root.eventcontroller.simTime);' u; @9 B! Z& h" {( x
@.HasOrder := false;' G9 b' J* ]9 D# P. r& m6 g% @
@.DrivingHome := true;+ O4 u; R8 X" \; [7 j7 F
rgManager.tryToStartTransOrder;
% N- K: O$ i6 C2 p( u if @.Destination = void
, ~5 D2 n7 a$ A- @ then -- no transport order for vehicle @+ c0 P8 S; P c, C9 L1 u2 x
@.Destination :=
" F5 J% s7 z& j/ ]- g1 ^ rgManager.nearestFreeStation(@,track.~);
% J% [! u2 G* V: K1 u newDirection(@); 1 u- N- F; r9 z( c5 {
if @.Destination /= void then
/ M" U3 s1 i8 ?/ B. M; }* f @.Destination.NumReservation :=
3 i" u/ I- H6 Y8 u @.Destination.NumReservation + 1;- y* g2 Y' M# ?) g5 e
end;0 D/ q# U; W1 k# T4 u/ y
@.CurrIcon := "drivingHome"; j/ m2 p4 J1 P" N
@.DrivingHome := true;
/ e+ K& A+ \3 G6 `6 m( P end;
1 Z/ V( F# N( J% E8 W9 \# s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# k2 R8 A( b ^! J( d5 B# `6 ]# O" y" G part := @.transpOrder;" ~5 l8 b; p V: o
part.move(@);-- load part
" z/ s7 r( q0 ~4 y A/ @1 M @.CurrIcon := "load";
# F5 l R$ R3 D5 G GlobalDistObj := part.globDestination;. M3 u6 _6 U! P
assignLObj := rgmanager.rgAssignL;" i5 J3 _ F- r' ~5 a# M
row := assignLObj.getRowNo(GlobalDistObj);0 M* v) u4 k4 c) p4 a9 W8 Y
if Row = -1 then -- since 70. M, b2 W* l, Q/ {
if lan=1 then
% B" G4 c6 s7 K% y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 G- ]% M4 u+ m( d3 I+ G to_str("in der Andockstation: \"",?.~.name,"\""));
$ i- W$ N& q+ S0 t else) E$ \9 i! [6 _9 z2 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 o/ R1 S, u" u9 W$ t; l( ?& l
to_str("in docking station: \"",?.~.name,"\"")); 9 f0 k$ y7 A) f
end;
! p9 i6 h' i u; B6 k% ^1 X else
$ O: u# Q" V3 B$ ?$ N" a: r' o: P @.Destination := assignLObj[1,row];
4 f7 y5 f6 H* k. @ end; 8 N2 u, R0 l2 e7 q' s4 h
newDirection(@);* X, w1 [0 D/ C( y
@.HasOrder := true;
# n! P& ^* {3 R) ] end;2 I6 Q) g/ M! S5 t9 J
end;
) [8 i+ h7 w Bend; -- of the method
+ w d8 L/ Q6 Z' k |