/* called by: entrance ctrl of the object 'track'
2 `9 m) E% n0 e% Q0 O*/
/ i* r1 T3 c, i! E) L$ Z# F" fis
8 |7 N* X6 I) \4 s; e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 H; S; J( u, pdo
, j6 j' F0 n& H! S4 {) n6 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
& I! V% y) w% x2 v* k Q9 \7 U if current = @.Destination -- else return
) Y% n- K- T9 u2 e! i then2 [8 `) G! U, I" `* J0 _, J b
@.Destination := void;
1 j9 [6 W# z+ H9 I if @.occupied then4 `0 _- y8 T! ]; P- B+ m
part := @.cont;
! t/ h' H" |. U h6 W( K8 N @.transpOrder := void;
: D9 M6 U1 C1 y, K. c& x: F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. x: v& r7 W& ~. w- k @,root.eventcontroller.simTime);
$ l. `+ x, I' w+ k @.HasOrder := false;
6 M2 p3 [' X! j6 {; \; _5 v @.DrivingHome := true;
, d; ^0 d9 h$ p6 _- |7 f% Q! b/ s' R* d rgManager.tryToStartTransOrder;
' P9 o" {* q) L, S9 A- ~ if @.Destination = void
1 Z- a9 c3 ?# J& q5 v then -- no transport order for vehicle @
( P) Q5 W) I% g1 }% z @.Destination :=
6 m0 h4 ^& b. q" _ rgManager.nearestFreeStation(@,track.~);$ T0 j) z0 s5 L$ J4 Q8 {
newDirection(@); 7 t( B3 O+ k" Z
if @.Destination /= void then
) ~6 k: @) t- U8 W2 E5 i, F, r @.Destination.NumReservation :=/ U# `! c, y) V4 @2 K: s
@.Destination.NumReservation + 1;
: h' F5 z: V4 B& D1 C% { end;
' [$ I, y) Y" @2 y2 m" m @.CurrIcon := "drivingHome";
' s) K! j9 b/ p, C( \- A @.DrivingHome := true;) ?9 M% m( g/ Y
end;
- ?6 Q" J& V" v ?4 Z" L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. {$ T, t+ _$ m part := @.transpOrder;
# k+ T+ x1 H/ Z part.move(@);-- load part9 s& F& J, h1 r; B" h
@.CurrIcon := "load";' U F2 Q ^6 N4 r- s2 F/ D
GlobalDistObj := part.globDestination;
$ V8 H& z5 M9 w' F- O assignLObj := rgmanager.rgAssignL;' Y( Y& t; {( N6 t; D4 s
row := assignLObj.getRowNo(GlobalDistObj);
1 ]/ G8 h- z( a9 C# C+ v if Row = -1 then -- since 70" b, A# ^/ z8 W9 o$ L
if lan=1 then
! R/ `$ X' P4 i$ d7 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ Q$ U4 d4 {* K
to_str("in der Andockstation: \"",?.~.name,"\""));- H. Y7 ~9 O/ p- Z' c
else
" w: [) z% ~9 l" |8 o* K4 E2 H Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 B) ]6 q3 P9 |% K7 a# S1 ?: F- f to_str("in docking station: \"",?.~.name,"\"")); ) C7 { ~3 h; C: u& {4 k0 B
end;
% w: A3 p6 D4 { else
. Z0 v% k2 O2 C* ^+ \0 r5 R @.Destination := assignLObj[1,row];" o8 V" W$ K2 Y0 O2 R
end; 3 R4 ^6 m* y/ ^% ]! T& f
newDirection(@);9 a F$ K" a# [6 R5 u
@.HasOrder := true;3 a4 G6 L- X$ ~1 r3 L: A+ I% c
end;1 c" u- I# Y: z6 v: o
end;- {4 p' o& n! e! R
end; -- of the method
+ r& W" e. g( e1 U4 u$ Q |