/* called by: entrance ctrl of the object 'track'9 g( D4 }; K5 _2 y, I
*/
% h* A; a! n: `1 S( his
% w" _/ {* {7 f0 x& }1 l) T part, GlobalDistObj, assignLObj:object;row,Lan:integer;, n8 V/ O1 l9 _+ A- _" i
do, P$ O4 m' z9 C4 S& e* m
Lan := rootfolder.Internal.Tools.AOLlanguage;2 d2 ~& @% S) G# z# j" l F) I
if current = @.Destination -- else return5 { ^8 m U$ ~! A8 v
then
8 ]$ Q: n1 w+ o% M4 m8 Q4 r! _; ~+ r @.Destination := void;) x* ?$ j0 L3 V' ]
if @.occupied then" _+ M* z$ i4 Z2 d+ u; |6 Q2 q
part := @.cont;
0 V& [+ b" z- M& k' h+ f5 S; v0 S @.transpOrder := void;
5 j/ H5 N6 [5 v6 u9 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ x/ y9 x! n1 O# P4 q0 a! Q i
@,root.eventcontroller.simTime);9 }, A+ W' S/ v$ [! e! N% I1 r
@.HasOrder := false;2 g: x. C4 z" c4 X; c8 j i6 T
@.DrivingHome := true;
, L! C, X' s. y rgManager.tryToStartTransOrder;
) P/ [' o4 r2 I: ~ if @.Destination = void& f9 ? m; h' v- n( g2 x
then -- no transport order for vehicle @5 X: Y b. m( K- v; K5 J8 ?% c
@.Destination :=& o5 l0 O$ C: _+ G ?8 g/ z
rgManager.nearestFreeStation(@,track.~);; n) E! k7 z ~0 ?
newDirection(@); 6 @* W6 V0 U! d2 z6 c
if @.Destination /= void then# _: _/ @) F' R. T0 W
@.Destination.NumReservation :=; b: _9 i0 d- k+ o4 ?) _
@.Destination.NumReservation + 1;
) `2 A& f R2 [4 U7 _ end;# |% t I0 S7 _
@.CurrIcon := "drivingHome";
1 N* A/ C. h- |- \! q1 b4 l @.DrivingHome := true;
! ^ Z8 x5 a4 V/ i& i end; r% i, X9 J/ o( w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ F; S7 e4 I2 Z; T$ w3 A9 h _3 I' J2 K part := @.transpOrder;, t, {7 d9 Y) p! t
part.move(@);-- load part
; f/ ]9 [3 M0 j: a5 J @.CurrIcon := "load";
0 M0 h7 I. M& Z8 y5 R% n" S GlobalDistObj := part.globDestination;5 D9 E6 j/ r0 @. r, r0 e
assignLObj := rgmanager.rgAssignL;; a) c2 {8 O6 i3 W
row := assignLObj.getRowNo(GlobalDistObj);5 j1 Z T! a# Y8 D! @" m! S
if Row = -1 then -- since 70
6 x9 c2 ~9 U' F. f4 i if lan=1 then% H. E' x2 B" P4 V* r& H% P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( o- b7 H: Q6 h" h9 _! x3 H to_str("in der Andockstation: \"",?.~.name,"\""));; @: s ~% y8 }: V( u e& I
else3 c: V# E2 \9 d7 H1 x4 D; k7 G$ N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% c9 G( v# M2 l3 k9 x7 `; ]
to_str("in docking station: \"",?.~.name,"\""));
. ^1 R; X/ l$ m s+ L1 [ end;
7 y% ^8 `5 [- N; H% E( p else) z' d; J5 g1 K9 w7 a5 @' b
@.Destination := assignLObj[1,row];1 R- X% G' A% m
end; & a: H) Y1 b: [6 z; b) x
newDirection(@);/ N) |2 I, i5 F2 t, Z
@.HasOrder := true;
- u! c8 b8 @; p9 u end;
2 a j. b5 z$ T# n. f; t* p end;
& h3 a9 V4 j5 t# C9 J3 R7 p$ Zend; -- of the method, s! E5 p2 F3 \
|