/* called by: entrance ctrl of the object 'track'
# T" ^/ R8 z" o# Y: u*/3 o+ M* T7 |& i6 H; c
is
+ V) e- w4 j* [' ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ g. P& S9 a& b: W* V0 Ddo6 [* r5 y W) l; p: l% R
Lan := rootfolder.Internal.Tools.AOLlanguage;% F5 f7 o8 C2 l2 R5 V( F
if current = @.Destination -- else return
9 s6 {& n5 ]) L4 z: F! s) B then6 }5 U1 i1 W9 Z: J4 M( Y6 S+ g# y
@.Destination := void;3 Y$ D0 ]1 H6 A- K) i4 r' r
if @.occupied then
9 |% g' Y& j. c% ?$ {, Z part := @.cont;
* G( r9 Q( n6 s8 R* K @.transpOrder := void;
0 a/ N4 T9 Y; v( _$ x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& g& I" p( a7 K% N+ s) p
@,root.eventcontroller.simTime);& M$ E( w" e( C0 E, z9 P7 O4 [
@.HasOrder := false;3 d7 Y# A& \! A' I
@.DrivingHome := true;
/ H E. _! D% ^5 @: z rgManager.tryToStartTransOrder;7 B' s7 f( f6 s6 h
if @.Destination = void
2 C( Q$ o$ ^0 G2 F then -- no transport order for vehicle @
^0 P s& w( u# z @.Destination :=+ s8 w, g' f: H$ K5 s) @
rgManager.nearestFreeStation(@,track.~);
0 h- }/ i8 a6 R( w5 _* T' R! v newDirection(@); 9 [5 I# H/ ?& \, j( N2 `; e$ X
if @.Destination /= void then
5 V& I( Y9 W; W; H' O @.Destination.NumReservation :=
% w9 _9 J) g$ B1 k @.Destination.NumReservation + 1;9 o6 l4 _7 v( g" W, V B2 i; t
end;
0 x( y f! J& v7 Y4 H4 m! S8 ~ @.CurrIcon := "drivingHome";
* L1 ~7 J$ p6 F6 G @.DrivingHome := true;
6 n0 O9 X6 I( s- ^6 a end;
1 X0 ^, e$ _( i( u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ t4 H" L5 `6 C# o3 x0 R part := @.transpOrder;
. E) u% r5 V4 w* e( a$ I part.move(@);-- load part6 t* K- Z* N1 ]9 \; s! Z; B4 X
@.CurrIcon := "load";+ Q- K! G/ W6 e
GlobalDistObj := part.globDestination;
- F- X7 Q) H5 o. v3 T assignLObj := rgmanager.rgAssignL;8 e6 K% y7 v. k& e9 B+ S
row := assignLObj.getRowNo(GlobalDistObj);5 r' X6 C6 X8 r$ [0 H( O
if Row = -1 then -- since 70
1 W. \; r8 p; Z7 s if lan=1 then
& _3 x9 P* A. {% J$ j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," w/ V1 p& Y9 B4 [ v/ s* b0 \
to_str("in der Andockstation: \"",?.~.name,"\""));1 W X5 a1 f h' a Z2 j
else
5 f( j. q. e: ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( w5 [* f1 K, d2 |* C; s, ?
to_str("in docking station: \"",?.~.name,"\""));
4 F3 N( {6 A/ \6 J& B6 v* M end;
7 Y2 p: x: y* t5 v3 L! C7 i. v else* `; i4 N- @. ]9 o4 e# r3 z
@.Destination := assignLObj[1,row];
: ^, p- d* V& e/ ^& ^; I' g q4 z end; ! O6 K" h# ]5 L3 S% h6 M+ Z/ e
newDirection(@);6 k9 x' h+ }& L* w. ?" v: B* h
@.HasOrder := true;
" c' ^, h0 t" Z end;8 E C; h( B2 e! r- X
end;
! ]1 c9 D7 ?; d1 R) D; d! p: u' Tend; -- of the method
8 _" S0 L; F, S3 V6 a5 o |