/* called by: entrance ctrl of the object 'track'
3 L! W9 x4 s3 x* x*/ x6 u- c9 }) `5 t. b K
is( p* W' D$ [1 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 K( \0 e9 U0 W+ {% i/ s! T2 u6 m8 cdo, i4 F" k& W# f
Lan := rootfolder.Internal.Tools.AOLlanguage;6 C( W! }3 v& s# F
if current = @.Destination -- else return
/ Y- \% e) v" ~1 v0 C then
7 M- P7 d- L+ O. U1 J3 D @.Destination := void;* ^& J+ F$ h, H, F: D
if @.occupied then! \5 c# w1 j9 W5 A5 ?" C
part := @.cont;/ N& t2 Z) p- `9 |4 g% T: q$ ]
@.transpOrder := void;
% `( z+ U+ v5 a" l" O# Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 I2 ^" G {- n" n4 D @,root.eventcontroller.simTime);6 `* A. {( A# L7 x1 o D2 m
@.HasOrder := false;' E& C( [4 Q$ { ?5 X: A
@.DrivingHome := true;
) A+ X4 v, A: r' z# o3 h rgManager.tryToStartTransOrder;4 Y) q+ ^8 h/ c* a- d2 V+ P
if @.Destination = void
% h$ v) i& t- x. l- I then -- no transport order for vehicle @
$ |& x; X! l% E& k3 y0 k# I! N+ z, o2 m @.Destination :=
) Z3 L+ s$ W1 |7 Y* l+ S M rgManager.nearestFreeStation(@,track.~);
0 R( W, G. P/ `+ g; H newDirection(@);
* s. x0 f% D. u( P if @.Destination /= void then
0 u# b$ ~ f% w, S) o @.Destination.NumReservation := B3 a0 o- ^% N1 m' u
@.Destination.NumReservation + 1;
# C* |6 g f; S+ M end;% j; a. A( t; g+ p! K. O
@.CurrIcon := "drivingHome";( o- f6 c8 g% C$ o L
@.DrivingHome := true;- u1 J8 R6 y' D; A. S: u
end;
+ |: p* U$ _; n" g, w# L) f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 [' d& A9 i! s& Z part := @.transpOrder;
" z9 D/ F3 t( X4 ?# P& W part.move(@);-- load part
' M" {# n+ J7 {* _* ?/ A @.CurrIcon := "load";, ]0 f& S; t- J- P2 `
GlobalDistObj := part.globDestination;
$ C& k+ `- [! [% l- c8 o assignLObj := rgmanager.rgAssignL;. O) h& @: W" Q" o7 P
row := assignLObj.getRowNo(GlobalDistObj);6 G. n; w0 s9 }! C' k: H
if Row = -1 then -- since 70& F2 `. A( r9 B0 \/ V$ X
if lan=1 then0 A0 Y% Q0 P) U+ g: O% v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. j7 _0 o. g" M& `7 P s5 q9 X to_str("in der Andockstation: \"",?.~.name,"\""));+ u8 O. k' C6 m
else
7 }+ ~# E/ g* {- n% k7 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 C, x. K+ l! r4 H5 b `/ K7 a2 [0 V
to_str("in docking station: \"",?.~.name,"\""));
/ q: B% m1 b$ C5 H9 B+ {. C" u* K: h end;* h4 D0 @6 w, \ n) ]+ Y
else/ C) C$ O) L8 K7 p# k
@.Destination := assignLObj[1,row];& X, D( E: V9 i6 l/ c
end;
0 s+ Y/ Q% V9 D( n newDirection(@);8 v) I( }+ i3 Z" J
@.HasOrder := true;5 D4 k* ~# {( b: c
end;# M# c/ |3 U; x3 R1 a
end; U8 B# w/ ~6 N) p7 c0 L
end; -- of the method
. x' {; c; m6 ^) ?7 s+ k5 s |