/* called by: entrance ctrl of the object 'track': f; ?. b4 P9 ^
*/
S/ L- v2 \4 l B, his
7 l7 H% j9 b& w& c% F c part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ @7 A2 o0 |! _0 |
do8 u$ `6 b, s8 }; Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
' t. M4 {* ?. \% A; [" l8 {2 X* Q if current = @.Destination -- else return
- Q+ Z3 I( Y+ T; D8 ^ then
. B1 w! T6 i. Z# S+ l @.Destination := void;
5 }2 W: G+ \* V5 y/ d# x7 o if @.occupied then5 p, b5 k$ w+ [3 Q. P
part := @.cont;& [9 `" g2 o9 d- Y7 Z
@.transpOrder := void;
7 T( J. P$ d1 F6 W' n- ]+ k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% y) e+ G. p' {# h+ d @,root.eventcontroller.simTime);) ~5 M& m+ h2 x8 \8 f
@.HasOrder := false;/ g% _. t1 J7 A6 A' G$ d* L7 q" O a
@.DrivingHome := true;
_. @* k5 c2 c3 V6 y4 L rgManager.tryToStartTransOrder;
- X* U6 G3 v: p9 m if @.Destination = void
5 |0 H# i: f7 q5 J then -- no transport order for vehicle @2 i3 j' A5 X- y4 w( \" v
@.Destination :=2 B$ e8 f- ]# a1 H+ q5 c+ X
rgManager.nearestFreeStation(@,track.~);7 _, j1 p0 V7 }$ D! B& W5 C
newDirection(@); - A; y% K& t8 h$ X% d! z. j
if @.Destination /= void then
, L; H: }8 h W* c+ t @.Destination.NumReservation :=. u- C6 p* H4 A7 ~# x
@.Destination.NumReservation + 1;9 d( l3 T4 X. D9 E5 d8 M
end;) R( i* b/ \. c# p m
@.CurrIcon := "drivingHome";* r! \) |. @$ q! B7 f% u
@.DrivingHome := true;
; a% Y- U; Y8 q# [# M end;7 i- e8 Q- W9 T( _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
E& \6 M( z. r3 ?6 T# } part := @.transpOrder;! t/ c6 ]" ? q9 i0 R
part.move(@);-- load part( N3 |+ Z- C3 ~
@.CurrIcon := "load";7 E2 S# e4 Y, r4 h) [% T* u7 ]
GlobalDistObj := part.globDestination;
1 Y& j( z. q1 Q- x assignLObj := rgmanager.rgAssignL;
( T" j/ e& t e6 y row := assignLObj.getRowNo(GlobalDistObj);
8 |7 b% W% W+ n/ _+ E6 q if Row = -1 then -- since 700 m; H/ |4 T1 H, y0 s: r5 H
if lan=1 then* a4 R1 D) N# `. }6 S% V7 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 \' A; |" i+ u+ G+ D' B% Z
to_str("in der Andockstation: \"",?.~.name,"\""));( p: p( o2 ^! N5 Y8 U7 f5 E
else! a5 Q& e* L4 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! c- U6 {3 m2 p to_str("in docking station: \"",?.~.name,"\"")); ( ?$ c/ M: B% C9 r; o0 d
end;
, X1 ]: H' B$ g else8 I9 H# b$ a8 w' M- v
@.Destination := assignLObj[1,row];
+ C2 D7 z' P6 c2 @1 u" \$ _4 {% s4 \ end; 1 A4 b9 \4 w2 _, _" S7 c, o: n, Z
newDirection(@);
- r7 N( {6 f; @! L @.HasOrder := true;& U- g( J1 u+ w$ h8 W
end;
- ?9 E! U9 k2 v8 S. _8 [: G end;
, N% O; _3 _$ k v# g6 yend; -- of the method
5 }. N5 R4 c" A! I% |8 a8 p1 j |