/* called by: entrance ctrl of the object 'track'
$ I4 J- T/ b3 o% P*/
# V( j J3 R3 H, p' C' G1 `9 yis
. _ V4 r |/ t% ]$ |5 g4 n5 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;, N& I1 f' N. i) u
do
" E) m3 P& H: S7 k Lan := rootfolder.Internal.Tools.AOLlanguage;& n1 Z9 C. b% f( v( W
if current = @.Destination -- else return
3 k2 Z* p. `, x4 w then2 @/ @- `+ @1 q2 O; E2 k
@.Destination := void;2 j8 S* ~! R1 Z c1 I9 ^
if @.occupied then5 U! ?0 F) A/ N
part := @.cont;3 Y8 ]5 x$ U T8 }4 b
@.transpOrder := void;: a( K: S: x% n6 I$ o: z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 x$ ]5 h8 o' U ~# n3 [
@,root.eventcontroller.simTime);
) d8 z% K: A! ^! B$ H7 { @.HasOrder := false;
7 U/ q a0 a; u0 {& ` @.DrivingHome := true;' O# [" |2 y- `0 ^2 s
rgManager.tryToStartTransOrder;! S* E0 K8 x6 v c* h
if @.Destination = void
: s0 k3 F4 D4 `3 U2 I: P' A then -- no transport order for vehicle @
$ V R l: L# v, q; n' M; c @.Destination :=
! {% `, H$ C1 r" R" r( m' l2 V rgManager.nearestFreeStation(@,track.~);
& F3 T5 I: B2 `/ N3 w; D newDirection(@); g; ~6 w' S( N9 C: n' ]: S
if @.Destination /= void then
/ d8 b3 k2 A# e! @- z& B @.Destination.NumReservation :=! y2 { Q8 J. k" k! A! E" D
@.Destination.NumReservation + 1;
2 M# T1 e& p! l% P) [ end;" O2 U: v2 r/ H; W ^: R
@.CurrIcon := "drivingHome";
. v; A* i9 z- U @.DrivingHome := true;/ d( ~4 H+ U9 Z; e, W9 L3 P5 ]
end;
6 \- s2 ]6 T5 z: V+ Y- ?1 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ]1 ?4 n1 N, O5 D
part := @.transpOrder;( `8 c1 n3 Q7 B8 L* P: G4 _, I; _
part.move(@);-- load part- H( |* y3 c/ r: t; u$ c1 K
@.CurrIcon := "load";& Z/ u/ Q9 t5 F$ N K
GlobalDistObj := part.globDestination;
! d4 y$ m9 u/ @ assignLObj := rgmanager.rgAssignL;6 F- t9 i5 i/ X2 q
row := assignLObj.getRowNo(GlobalDistObj);$ T) g4 n1 x$ p) a2 i( H
if Row = -1 then -- since 70
) g+ f. ~1 i$ X* f) | if lan=1 then& v) r9 R" K H7 U1 l+ L6 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; l5 S& W1 |; v( c7 j- Q$ {3 m, _! x" g3 D
to_str("in der Andockstation: \"",?.~.name,"\""));+ X/ T+ b' [. W" n9 X
else
; |0 f2 W# d# t, r D6 C/ I& K1 ?' L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" v9 r* f' R$ M8 {4 N to_str("in docking station: \"",?.~.name,"\""));
6 z! x! v7 ~+ s0 n1 _' @2 Z# L6 ^ end;
9 h0 f0 N: @% H1 C4 K2 U else+ d( p5 K% k: g* K9 l
@.Destination := assignLObj[1,row];. @$ g7 F! D+ D" m; d
end;
4 _5 B( g8 V$ L( U: z# R4 f newDirection(@);: N7 m( [3 g a, ^
@.HasOrder := true;. F4 b1 h. x& u3 W
end;# L, ^4 I$ P( x; X* `2 \ T' W
end;8 u$ b/ @# P/ x
end; -- of the method
0 Y8 g/ a9 |4 b4 V7 X |