/* called by: entrance ctrl of the object 'track'
5 x; t6 K/ u( U% |0 e' R( I*/# {1 j& b- Z. E0 z
is$ C6 O; f0 h+ @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( F) S6 c1 D# ]8 }4 v9 ?6 gdo! J8 A0 p+ E8 E' c( M
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 B% Z: d2 \3 J+ ~6 ] if current = @.Destination -- else return
, c2 a+ c& |' |8 n* V then* v/ ~3 {- T3 }) y( n+ Z) D5 M& C% T
@.Destination := void;
8 D3 { [4 p) p1 V if @.occupied then
& f3 l* i7 v+ J' j: c! t% x# t part := @.cont;! G6 r6 M y b8 `/ A; Y) \) z; G+ S
@.transpOrder := void;* M5 V. B, S0 h, { d( w. Y9 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 w% f7 F$ K, n, \
@,root.eventcontroller.simTime);
& \& {, c! r) f3 `3 W$ Z @.HasOrder := false;
, A" ~" L! t) |' l1 k% [5 T6 n @.DrivingHome := true;$ @- F! R, H/ ]! g+ X
rgManager.tryToStartTransOrder;
* Y+ [7 ]: Q0 ] if @.Destination = void
- o7 t, Y, u+ H' { then -- no transport order for vehicle @
+ G+ j% h4 Y+ k8 ?6 L; F& B @.Destination :=
/ P5 u' z5 H5 c rgManager.nearestFreeStation(@,track.~);: g+ {( \0 ~6 x9 L5 G$ Z
newDirection(@);
% D2 J$ F; p# y if @.Destination /= void then6 b7 x+ }& L; b8 B1 B
@.Destination.NumReservation :=
1 X2 A* a' t0 K$ e# \. A3 o$ E @.Destination.NumReservation + 1;
, C6 d/ i5 O- v$ c3 i end;7 |, P' ^+ w1 ]0 _
@.CurrIcon := "drivingHome";
/ T u- S6 [$ c' _- k @.DrivingHome := true;& s1 [/ m' p" y4 A& ~' i( L; S
end;% ~; n. E6 t* A! F6 g0 K# t; E2 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. g. d5 m" `% P4 [& J8 r part := @.transpOrder;1 {7 v, u5 l( b" u
part.move(@);-- load part) k9 G4 l* O( D# O( D
@.CurrIcon := "load";/ @* Q* V4 R( ?/ J9 |* |' b
GlobalDistObj := part.globDestination;
- |4 T, V1 o2 s1 N/ K assignLObj := rgmanager.rgAssignL;
- b: V7 v, S6 z, t, A row := assignLObj.getRowNo(GlobalDistObj);# ~$ H( g1 p; f4 O* X a" P
if Row = -1 then -- since 70
* p1 S& I0 B3 p& w+ E5 V if lan=1 then4 c* P. D; L; c3 a& p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 r9 D( }" T% M' i$ T* n' g" g/ X to_str("in der Andockstation: \"",?.~.name,"\""));
4 O3 P$ v; w- f( t9 Q& L4 g2 M: q: p. U else% M; r8 j0 k5 B; l+ g! x# R6 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), S* ]8 {, {0 N" g9 v
to_str("in docking station: \"",?.~.name,"\""));
/ l: B! G$ B5 G$ u2 U" B end;
( G0 Y; V5 g1 U( [; [ else- a9 a5 t+ b3 E. w5 s: S
@.Destination := assignLObj[1,row];
7 v* F3 E5 D9 J, E9 { end; " ~( U B: [' h. g* w
newDirection(@);3 L* G- B& `5 K+ N6 M( f2 i
@.HasOrder := true;7 ?/ y8 y! v4 ]) q& g6 Z3 l
end;3 V" O' q# L/ h% z
end;
$ C$ z( e8 U! _6 Wend; -- of the method
* N/ i. x5 F, ]. T; O; J( r |