/* called by: entrance ctrl of the object 'track'
! k* x, w' F. _! [ o*/! |% V7 S T$ r5 `6 E, U
is8 s/ j3 t( O3 v1 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer; `8 L+ ]& h( L; V2 {
do
) g t/ u1 J5 Y7 d* A Lan := rootfolder.Internal.Tools.AOLlanguage;
0 p3 i. L2 v k; R* \7 p if current = @.Destination -- else return+ E9 P; x! z2 f( T9 ~
then4 h2 G+ A6 l H/ V; a; W: Y
@.Destination := void;; K$ C; S$ p6 i
if @.occupied then
3 w% X3 z3 B/ b' F1 V part := @.cont;
/ V# }, B% s- e { @.transpOrder := void;
/ D- F& n; V; U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," P( I0 D+ Z2 D2 H
@,root.eventcontroller.simTime);
3 g, f2 d7 T- n; g @.HasOrder := false;
) W& E" a$ l3 G- t @.DrivingHome := true;: m& d* l0 h' S, f
rgManager.tryToStartTransOrder;8 h7 d& G) p! g E
if @.Destination = void
' m0 G1 m9 A/ U" U8 s! `, j then -- no transport order for vehicle @, R2 v; ]0 h9 e) U2 @$ v: b+ [
@.Destination :=
; |& D) Q4 g A7 o4 `( E$ i rgManager.nearestFreeStation(@,track.~); Y) O; t/ M# D r( z; y
newDirection(@);
* P3 `' c8 a1 a$ x! }5 ?3 F if @.Destination /= void then3 W1 ]. X. [( w6 J* Z4 u- c- _. E2 |9 K
@.Destination.NumReservation :=# Y$ N2 c3 C/ K1 P9 K9 k- l+ t! U
@.Destination.NumReservation + 1;, u& {' q' v, B# D; M- a( N, _3 F* D
end;& b3 u3 F- a: V. {
@.CurrIcon := "drivingHome";
0 ^6 U. ~% \0 Y( y& H8 b6 y/ [7 O @.DrivingHome := true;
5 E8 J9 ^. d9 M' L) D# R: y/ ^+ h- M end;6 ~* h! X/ k- k2 [ J, e+ c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( s! @: B3 l9 a
part := @.transpOrder;
) } q$ _: N- | part.move(@);-- load part
$ y+ g5 @# y5 O# S/ U @.CurrIcon := "load";
: Y9 w, h; w" M7 g t! U GlobalDistObj := part.globDestination;- R" e5 g. Q! ~( ~
assignLObj := rgmanager.rgAssignL;
$ t: d, s& v5 W9 l- | row := assignLObj.getRowNo(GlobalDistObj);9 d' n& d+ t' m3 C" m! x: `
if Row = -1 then -- since 70
g3 s$ w7 W: @9 ?7 T if lan=1 then8 F2 e* ]% s$ V% q* c# u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ O) Q* i1 S; R1 j
to_str("in der Andockstation: \"",?.~.name,"\""));
* ?# c. u) x, W7 v, | else7 S: x6 ^0 p, \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 }9 Z8 L4 T+ K( n. u5 g% V: i to_str("in docking station: \"",?.~.name,"\"")); 9 j! ^! m6 n/ @2 ^. g# @7 V
end;6 @9 n; o( n4 t7 e) e; e9 A
else9 J" ^$ b7 ?) u5 b
@.Destination := assignLObj[1,row];
( j# ]5 ~3 a$ a4 h( N( r3 C end;
0 V+ @9 j: n% F. l newDirection(@);+ S' Z7 [+ H& `2 G+ P* L
@.HasOrder := true;) y- R# b, U P4 u* I6 l0 x) g
end;
1 M! `: U) a& }8 B6 T* k, \ end;
& G+ C0 w, c. M7 L$ c& g3 lend; -- of the method
3 K+ F* ^; t+ t8 r |