/* called by: entrance ctrl of the object 'track'6 g3 r: e- X/ U! i: m9 [
*/! X3 z! p8 x; l- e
is/ r0 p* q7 W! {0 c) `! p" w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ m9 z6 d- C2 r; x# r
do
M l: i- Z' ^4 H Lan := rootfolder.Internal.Tools.AOLlanguage;
4 ]9 N7 G; j4 Z if current = @.Destination -- else return
- h2 r4 F# q& ?: A5 r$ M1 T, q then
. q. U- d0 f& l$ ]2 [ @.Destination := void;
6 H; G) m( {( M! T if @.occupied then
: s" U! } D5 E, j! f2 X part := @.cont;
0 Y( g, K) T. C4 j8 ] @.transpOrder := void;
) y; W) Z9 B% D( P ?. E- l( D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 O( o; ~( s* E% _6 U3 ~
@,root.eventcontroller.simTime);2 s$ F# _% Q3 ?7 e l! T$ G# H
@.HasOrder := false;
) ^0 ~# M) ]% i/ ?2 O$ r; a, U3 v5 J @.DrivingHome := true;6 h% X! m! D, c- C3 w
rgManager.tryToStartTransOrder;1 Z+ `; t/ y. w, k! A: `
if @.Destination = void
) f. J6 Y. l( [( S6 C/ Y+ H then -- no transport order for vehicle @
& M" K4 A5 H+ _ h2 Y @.Destination :=
9 o: O1 m) N; w' J0 O rgManager.nearestFreeStation(@,track.~);
3 X7 B4 O; m4 n" z# K2 S, ?3 J. H8 I newDirection(@);
! b0 x1 l3 G& U2 a( X if @.Destination /= void then+ C0 J) G' b; y0 N# O" W+ c
@.Destination.NumReservation :=, O6 _+ _+ r8 V& I
@.Destination.NumReservation + 1;- c Y' V- ^0 ^8 {: e4 J. \+ C
end;0 W8 K$ |( f% C
@.CurrIcon := "drivingHome";! Z( a' Y8 H9 f3 e' e2 M: p3 \/ g& ~$ ~
@.DrivingHome := true;1 I0 R7 z! \+ m& q" t
end;1 q/ d1 Y9 F, Z) P6 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; o8 k p$ |, O, n( T b9 \
part := @.transpOrder;
7 p# ?; t+ E5 [3 D part.move(@);-- load part3 }7 ~9 X& k8 U' U# Q$ E. L
@.CurrIcon := "load";
7 h2 e) T5 q6 d& _5 b3 N GlobalDistObj := part.globDestination;5 i" c3 x1 u8 P0 K3 [
assignLObj := rgmanager.rgAssignL;
4 l0 j( R2 d' J3 U3 T% N row := assignLObj.getRowNo(GlobalDistObj);4 t7 U: Q$ v2 ^+ a8 b; J8 |
if Row = -1 then -- since 70- f8 O& K9 r, @' K; r
if lan=1 then
5 T/ z9 e+ @9 Y# o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, |0 r/ r# b9 Z, l4 T8 w
to_str("in der Andockstation: \"",?.~.name,"\""));
$ L1 {4 _8 q5 [4 l9 k) b. A else
) Y% G! k5 l5 W5 g4 g X: ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 k2 }7 @/ a. _
to_str("in docking station: \"",?.~.name,"\""));
, Z0 z* r( b( _' n% f end;: G9 y5 H( V- _/ ]
else
/ d: Z, _% E+ s* g. K @.Destination := assignLObj[1,row];9 c, H( s# G6 G; Z9 Y5 D
end;
& [/ ], q' z! ? v8 r newDirection(@);
' H. r) k3 F, q) c) K @.HasOrder := true;( V; H5 Y. A; W; [- J
end;2 K2 {% x! S: |" [
end;$ t9 _1 I" C, J% C! Y5 ?/ M
end; -- of the method
s( N1 [! i1 G" f& |: y9 a |