/* called by: entrance ctrl of the object 'track'
y# x: {1 j6 C*/
2 n7 C* j* y7 V; ?" c9 L8 {& {is
) R+ U1 _& `" o( u8 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 U! y4 t" L2 `! M
do
: y* s( i9 B2 I Lan := rootfolder.Internal.Tools.AOLlanguage;* t6 g; X$ `8 v- }3 b0 _
if current = @.Destination -- else return$ I ]) c: w0 L' F+ T$ t& i
then7 D6 x3 d8 r+ R6 ]5 R; n
@.Destination := void;
' f5 @3 g* u. o, J0 I. l if @.occupied then- s, k% H% O- o3 J. _. ~
part := @.cont;0 r/ z5 r0 P/ W) y
@.transpOrder := void;
: }9 {; Y9 B+ Z2 K1 U) _' V' o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. R; M5 H' g/ Z; Z* U% G @,root.eventcontroller.simTime);
/ m! I4 D& B6 [ @.HasOrder := false;1 H3 s& V, ^6 Z2 A0 f9 |
@.DrivingHome := true;2 C* N# Y4 Z' l8 Y# n4 ~
rgManager.tryToStartTransOrder;
: K- @+ i: C0 N if @.Destination = void
R2 o8 x& Q7 M5 t then -- no transport order for vehicle @: V; N- T! d( w; e8 }% T
@.Destination :=
9 B* h% v( [2 J5 g7 [* I rgManager.nearestFreeStation(@,track.~);6 U9 h( w( S9 U# t% Y
newDirection(@); 3 \; Q9 u8 @% X0 ~) I" d4 `
if @.Destination /= void then
; Z- E: v( ~" c' J1 L! V- y; w @.Destination.NumReservation :=! l/ M- H" p5 q& q. h C
@.Destination.NumReservation + 1;
: m. u6 e- `+ c end;/ A# N$ e6 |: g) a9 x0 \0 @
@.CurrIcon := "drivingHome";2 g3 P0 w5 E' Q+ p5 z- a7 H
@.DrivingHome := true;3 H* C& v% d0 p& J* \: `
end;
4 D6 g2 I" c) s else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ v8 D1 q0 V1 k0 A/ {
part := @.transpOrder;
$ \" `5 l, A9 D2 {" c+ }+ j. H- ~ part.move(@);-- load part
" i2 H* w' Q7 c/ ~2 Y# O; o @.CurrIcon := "load";/ v* O* |5 ]" @( Q T* V- c
GlobalDistObj := part.globDestination;
, R& A/ R. j9 K4 D @3 ^+ e1 m8 L assignLObj := rgmanager.rgAssignL;
8 v1 ]0 a% w- w; |5 b; J row := assignLObj.getRowNo(GlobalDistObj);! Q* f8 M% s; S& k3 N( T! _
if Row = -1 then -- since 70
& u0 ?$ Z# f4 H3 h' H0 L! J if lan=1 then
+ F5 C \% q. Y: i5 K( _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), [* v' k/ m; ~3 w( @
to_str("in der Andockstation: \"",?.~.name,"\""));) D& L$ \! `6 P# ^& }
else. s4 o2 R! H7 ~( I) T7 m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! R) }' O: R8 P; y to_str("in docking station: \"",?.~.name,"\"")); " D. [5 s d2 U0 b
end;0 t5 N1 A$ s" o- t; U% U$ L% j$ b# Q
else' D! z8 H' d; w. U! [
@.Destination := assignLObj[1,row];
* X; A* i9 g6 D' n' u( e( s end; ) t& k$ I0 P7 c5 z* S; B
newDirection(@);
! H% z/ k3 g+ M0 o0 j; x+ ? @.HasOrder := true;
- U* c: d- k$ `. q; z end;. x) {( t6 _5 R, E+ k, W, Z% C
end;" p& a3 A1 _( Q, j$ f
end; -- of the method+ a& A \1 M( f0 L* B% M6 o
|