/* called by: entrance ctrl of the object 'track': Y }: x* @# }* S
*/
& Z0 p# L. r4 t& Mis/ {! N/ y2 s6 ?. i- w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ Z1 D* D9 O1 r6 @2 C- D
do) h) H) A! j/ ~% W) ^$ \
Lan := rootfolder.Internal.Tools.AOLlanguage; Y2 {' d! }. B- R, q
if current = @.Destination -- else return6 M. ^* C: M) D2 j; j, n
then
6 n" {1 i( C3 {5 y j. ? @.Destination := void;+ g3 Y- a9 k3 U; K8 \
if @.occupied then
1 h$ ]. a8 E& q. @ part := @.cont; R( j c) U: v( O" H
@.transpOrder := void;
+ P! E+ I: E9 ]$ r% Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) @- e$ [; ~2 s; n
@,root.eventcontroller.simTime);
( \7 K/ \5 f7 T4 c% i0 i: B @.HasOrder := false;
5 d: l( _; H. d1 x0 b @.DrivingHome := true;
6 @9 N9 |% |* j6 ]3 B5 i rgManager.tryToStartTransOrder;9 q u4 n, g. f9 J0 ?3 o+ b3 w
if @.Destination = void
0 m# B4 o* Y9 q/ H then -- no transport order for vehicle @1 F7 ` j* B; m/ ^6 @/ F6 R4 @6 ]
@.Destination :=
# g8 F7 R X% r* y( u" m rgManager.nearestFreeStation(@,track.~);' l( c" F) w5 ~, H0 D1 h
newDirection(@); 8 ]$ [% {/ g0 r1 f/ H% V# n' B7 f
if @.Destination /= void then5 i+ F! ^$ e2 D2 G- d u
@.Destination.NumReservation :=
4 M( {; U" n0 O) q4 Q, b1 Y. M' v @.Destination.NumReservation + 1;! J; m& k: N8 W9 ?. @- N, A/ W
end;! W" D$ C, y; t
@.CurrIcon := "drivingHome";* M2 [$ l+ l; b; ?' t+ C
@.DrivingHome := true; P3 z* N" P$ e; I" _& F3 |* [7 U
end;, @; I; a7 z% O0 v) h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! G' Z; w+ Q5 T& U& ~6 I
part := @.transpOrder;
0 O8 b) O3 b4 Z part.move(@);-- load part
$ q1 l- [* i; v @.CurrIcon := "load";% ~" r; P, u: B t
GlobalDistObj := part.globDestination;
8 B- S5 b7 o& d' D assignLObj := rgmanager.rgAssignL;
! q! T9 Y$ `& z1 y# Y/ V row := assignLObj.getRowNo(GlobalDistObj);% ^: f1 Y# A- A; |+ o5 m
if Row = -1 then -- since 70& w8 H; p/ M3 A+ M- g$ Z- U
if lan=1 then
% U' I4 d6 {2 p7 Q. f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- p" w& j: p! u3 T- {: R9 x
to_str("in der Andockstation: \"",?.~.name,"\""));7 \9 ? a6 I7 w* M" m
else# S9 v C2 v# a! O4 [* L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' m8 C$ N! A2 m" y0 i a, j to_str("in docking station: \"",?.~.name,"\""));
' B) j& e+ F. a' u- D: e" U end;% X! }6 Q9 z& B
else
" D; D* Y. I/ Q- I; @ ] @.Destination := assignLObj[1,row];
T+ S5 L. C* X% t7 r end; & ]9 ^ S3 e& _/ N A; U4 L
newDirection(@);& V8 C1 H9 K7 E2 X5 v
@.HasOrder := true;# o b$ F, P* s8 D/ \) P# V
end;
2 j' ]& @! e G end;% e/ Q2 U# M5 J& A! [/ L3 E
end; -- of the method
# ]7 @9 s. O4 i" ^# L8 S |