/* called by: entrance ctrl of the object 'track'
& B: Z* [" N6 B# @8 k2 F$ t7 h1 U2 {*/9 ?2 N( Z7 s' D# k2 Q/ U1 \- f
is4 V* ^8 A; k) s- A+ w7 `3 ]' O% q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( n4 W: ]1 B' q; A3 }: u6 ~
do* r/ w) b: ]/ i
Lan := rootfolder.Internal.Tools.AOLlanguage;. j" S+ e& b( T4 M% f: f
if current = @.Destination -- else return
4 `0 o4 I1 \+ j/ n then
: j0 |' W3 c! x( { @.Destination := void;
$ ^1 Q2 S e5 ~/ V7 G if @.occupied then
: r1 P0 ~( }9 i6 Y part := @.cont;6 W/ ], R% U- O2 H
@.transpOrder := void;0 b1 B0 _: |" [2 Y& V& u) b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: n( `0 r: w' _) O' u2 o8 U @,root.eventcontroller.simTime);: }: k" a" ^/ z) l4 j, M6 V- t
@.HasOrder := false;! p% O: X8 f, G" V: q& d
@.DrivingHome := true;
3 S% ]2 ^/ v" Y, J+ A rgManager.tryToStartTransOrder;8 \' o: s& P$ ?2 Y1 p
if @.Destination = void
& c. T7 ~/ R3 D4 d then -- no transport order for vehicle @
3 n# t. d$ ]$ F0 F4 z" X4 w @.Destination :=# [/ @' }5 n. z, u! x, r
rgManager.nearestFreeStation(@,track.~);
$ S" F3 @9 w ~! s) Z4 i newDirection(@); / _5 x. q9 A% ?2 i. O
if @.Destination /= void then+ N3 {) \" f: X: k& s& e. q4 F
@.Destination.NumReservation :=2 @1 O- ] M B# D
@.Destination.NumReservation + 1;/ U; b g2 r! d: I
end;+ i6 A* r/ f# |' N( Q
@.CurrIcon := "drivingHome";
9 Q* @" w# R- @" T9 y9 H M @.DrivingHome := true;
; K2 O5 X$ V; I, l& C end;
4 {' V# v# Z& E z8 I- ]# f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
f4 f5 ^6 U& _7 N: p part := @.transpOrder;
& `% t* o5 v- o+ X part.move(@);-- load part
f( n* y$ g; W8 _; Y! V @.CurrIcon := "load";
' Z0 L; Q6 R: V" ]" C GlobalDistObj := part.globDestination;% O2 K' j% B! U/ ^7 p" \8 E
assignLObj := rgmanager.rgAssignL;
1 A, Y d* G0 a) M, J4 L row := assignLObj.getRowNo(GlobalDistObj);! P1 ?6 z# r7 S8 h v
if Row = -1 then -- since 70; ~8 J+ _. ?- o" {
if lan=1 then
4 s# e! g3 @3 @3 c4 C: P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ n+ I! }" X ^, U
to_str("in der Andockstation: \"",?.~.name,"\""));# P0 C; j2 _4 z' x* J
else
1 \2 A6 B' R7 S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; e9 P7 a" |6 n( i$ L4 {" H. o to_str("in docking station: \"",?.~.name,"\""));
/ t6 R/ V/ C; y2 f end;( m6 j0 _3 ~) { Q7 R$ m- t
else, `, E0 W7 M0 W* n/ y
@.Destination := assignLObj[1,row];
% h+ Y; V0 ]* u0 U end;
7 y7 t7 }: @% z7 g% R newDirection(@);
, M/ r$ i2 `3 ?$ u% i* n @.HasOrder := true;
* c$ A3 x4 {& z! r+ m* j' L end;
; I. \8 V9 s2 j, A) p end;6 h4 E: ^% }( J% j4 `/ C
end; -- of the method1 ^; I0 f1 K, E" _, a5 G6 o
|