/* called by: entrance ctrl of the object 'track'
" N; d! q6 \, M3 v5 z*/' w0 o- g/ Q! i6 Z( [" X
is
9 D H% O2 |: A$ V; ?" Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" z# w4 Q N% N9 ^9 {( Ldo: t8 ^& B8 G$ W3 b; h7 l
Lan := rootfolder.Internal.Tools.AOLlanguage;% v! z0 m3 g$ a M7 T0 ]
if current = @.Destination -- else return
* X) S/ w, w) V then" [# K8 X. q' V8 j' \" A- B' j
@.Destination := void;
7 k( V) r4 c# Z" E: Q+ a* z if @.occupied then" U) Z, D& ]( p1 a; d+ Y- a
part := @.cont;$ g5 l& T+ t. P# Z. y3 c
@.transpOrder := void;4 k$ c$ |* }' x7 X- x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 u& k* I0 p! j8 G! F D4 p) q
@,root.eventcontroller.simTime); {/ M( f; c! @+ A6 B, ^7 k
@.HasOrder := false;7 o) O5 N1 y& E) C( m+ t% I
@.DrivingHome := true;- j/ ]- p( w4 y* {: x% `( Q
rgManager.tryToStartTransOrder;+ C/ n$ u) I! Q$ |$ b% q9 D0 C
if @.Destination = void
5 N6 g' q: i/ ?; U; A then -- no transport order for vehicle @
% U/ d1 {. Y& @( C9 k8 F! s @.Destination :=& ^1 Z2 W8 _5 \6 {- s* c
rgManager.nearestFreeStation(@,track.~);: s2 q6 e. C' y0 O& w6 q9 C; ~ R9 N
newDirection(@); " N5 H; Q6 \7 H
if @.Destination /= void then
5 s+ }" M0 Z" F @.Destination.NumReservation :=
& _; [' ]5 E4 z4 N; P0 z @.Destination.NumReservation + 1;
P5 N9 v( @/ q- X* ]7 ?6 I; K9 j end;( y/ \% ~' M0 I5 b
@.CurrIcon := "drivingHome";, X q1 R/ o! P
@.DrivingHome := true;
+ b& X1 w( G% f2 [8 u( n6 O end;& [8 I3 K" P4 X6 t6 t. [9 Z5 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 |$ Y. g& k! C) x
part := @.transpOrder;
4 l6 Y- E" |0 w7 i5 F part.move(@);-- load part$ A/ d7 z" f+ \; M1 ?+ Q' U
@.CurrIcon := "load";
& w, W1 W5 `, r2 b3 N# n. k* U GlobalDistObj := part.globDestination;
5 \$ x2 } n* `. M6 i assignLObj := rgmanager.rgAssignL;; k5 }; h6 X: E0 O. e
row := assignLObj.getRowNo(GlobalDistObj);. ^$ X3 c: \9 h* c, b: L
if Row = -1 then -- since 70
2 Q1 s8 Y8 P$ K; D+ V4 ?; j if lan=1 then
7 ^, S8 F1 G; h! r/ K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& G- a4 z# o- G6 R0 e
to_str("in der Andockstation: \"",?.~.name,"\""));$ O/ [: a% f- b* M c" y
else
" Z% x: ~) E6 U1 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; e) ]6 \8 u( d p. b+ O to_str("in docking station: \"",?.~.name,"\""));
( T( j0 `/ I4 m6 D2 [% X end;
0 Y/ G) R L5 h+ I7 n ]" c else
" v$ \' q8 N7 I. b8 V @.Destination := assignLObj[1,row];. @9 Z2 Y [- M' E6 ?
end; - J! M" \$ _' K1 N2 F9 J& c5 Z
newDirection(@);# k. h) H, h) x
@.HasOrder := true;% R# ~0 q8 e/ F O
end;2 L- I. r4 Z% ]9 ]: L( M' |
end;
7 E$ ]/ ?7 U! ]( R; r9 z: N& Iend; -- of the method
! H. _: l$ P/ \, F |