/* called by: entrance ctrl of the object 'track'
5 ?4 A6 r9 e4 W# C. Z; T*/+ G- p |% N' q" z
is
" o Z. \3 g3 Y& P+ l3 Y* B7 \' l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 |" ?" L) _+ Q) x) Edo* e M' S- r: ^1 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 J. U, o1 @/ ~7 N( W+ z2 l+ i if current = @.Destination -- else return7 F1 s4 |% U! ]
then
9 S; H9 H/ m$ ]/ C @.Destination := void;
7 k. ?$ Y+ K9 N8 h7 @7 G* G if @.occupied then
8 `) q: N& J2 m7 j1 }7 `! | part := @.cont;
8 ? j: o+ y& C. J8 D, h @.transpOrder := void;
* U' [6 M2 Q) n: K J& N( C* b2 x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ p% c5 l) f6 z @,root.eventcontroller.simTime);& Y% B* Q, ~ _" T1 P: g
@.HasOrder := false;* l+ b0 M* n5 G3 J( |6 x
@.DrivingHome := true; u1 r/ h9 Z1 j1 l
rgManager.tryToStartTransOrder;
7 w. d) p% z& y n9 t( t# {9 v if @.Destination = void5 F) U/ W* z$ i# Z1 E
then -- no transport order for vehicle @
7 K# H1 ~5 H* K* Q9 t. A @.Destination :=
' V/ x1 t8 N7 V0 z9 K rgManager.nearestFreeStation(@,track.~);+ h1 m" A/ M8 ?! M
newDirection(@); 4 ^" x3 g i4 b* z& n/ T# d+ E
if @.Destination /= void then
, A0 M9 s O+ \- u3 ?! Y! x2 P+ e @.Destination.NumReservation :=
, h5 ]7 Y2 r) d7 V1 y' _* J @.Destination.NumReservation + 1;
, f9 d2 l$ P r# T end;
% @; i! m* g7 D+ T( ` @ @.CurrIcon := "drivingHome";
) T# @; ^7 K! `( i @.DrivingHome := true;: A* p# A9 |# L( c$ x3 h" o
end;
9 A8 V/ g; J# i. { else -- the vehicle @ is empty, both vehicle and part are in the same dock station& l) c N E. q! |1 }
part := @.transpOrder;
3 T: z3 N G% G, T part.move(@);-- load part
" Y' s1 ~; C: J, u- V @.CurrIcon := "load";' i5 g6 `$ k! ^
GlobalDistObj := part.globDestination;
7 |4 `% |, h. b' Y assignLObj := rgmanager.rgAssignL; W3 U: r+ }: x& V
row := assignLObj.getRowNo(GlobalDistObj);/ ]: Q; k7 [4 M' r2 [# P
if Row = -1 then -- since 70
" e0 I5 T6 d' Y m( F9 y! v if lan=1 then
8 s2 K1 F1 |+ r/ q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( x) O6 O. B' [+ Y, \8 D. q& B to_str("in der Andockstation: \"",?.~.name,"\""));3 |- b( O) K. T' q2 ^' i
else1 O% r$ }' j+ g0 ]3 ]5 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* M8 o* ^( Z. f& ^+ Y( M# U to_str("in docking station: \"",?.~.name,"\"")); & I- p- f$ s" z" b
end;# A7 c$ U& @* P2 S, R L
else1 {% F0 |1 W4 y j
@.Destination := assignLObj[1,row];
! O/ ]- z% X" P9 n6 F0 \* y8 N+ K5 I* S end;
# i0 K6 N/ k/ E+ e( _ newDirection(@);
: @! D4 O; k# D @.HasOrder := true;4 A/ i/ x# D- E9 W/ f1 o& A4 L
end;
% J4 B, `' q0 m: o9 l end;
F" Y* K, K8 ?, vend; -- of the method
7 ?: p w! ^+ Q* I& w' Y9 j% h |