/* called by: entrance ctrl of the object 'track'
5 S# w4 {* m# ~*/
5 A, @; ~0 O1 S) Bis( m1 h/ }7 h# a1 @1 R/ Y3 l2 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 d( ?! C7 S6 U6 w$ F( c" q
do; |6 G2 f5 {; ^ G4 g/ `6 _
Lan := rootfolder.Internal.Tools.AOLlanguage;9 \0 ^5 v, y }% b
if current = @.Destination -- else return
5 b" j6 |1 I- D0 @$ z& a then7 z1 m% t6 i( @ U- X9 f
@.Destination := void;
; f7 _1 i% X1 |3 B* \& R! O if @.occupied then
) r9 H- [7 j# I/ L# i* A) V! q4 Y3 n part := @.cont;! \, w$ }0 {& a' {5 k/ p( j
@.transpOrder := void;
+ g: k1 y: j! [0 _) P1 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ C' ^* V8 \; ?5 J8 O, @$ Q @,root.eventcontroller.simTime);+ l% A: j; b4 |* q w# [2 Q
@.HasOrder := false;9 D+ C& p& s( _4 J6 |& c
@.DrivingHome := true;& a: {& A" B1 O( q8 @
rgManager.tryToStartTransOrder;6 W9 Z' A- D0 {' E* W/ Q3 i. Q: C% Z
if @.Destination = void& x$ {/ |# { w$ @; Z/ f
then -- no transport order for vehicle @
6 b5 X0 z2 B9 t3 z- P9 B @.Destination :=
# b) H" q/ g! Z4 p" W/ I1 E rgManager.nearestFreeStation(@,track.~);
1 m& K, ~; T1 O newDirection(@);
) }: C! j6 a% _; l- v if @.Destination /= void then
5 z8 s7 @9 n4 @* r @.Destination.NumReservation :=
, Y; b1 m9 P7 n8 r& D! @0 J @.Destination.NumReservation + 1;( h/ \* T# M6 k5 u
end;
" S: F/ l6 ], D5 h Y% d! C6 ~ @.CurrIcon := "drivingHome";
$ t+ T" q( v0 z2 E5 a# o7 R7 t @.DrivingHome := true;3 ^6 \0 u' n3 l4 x3 I N/ l
end;6 A2 ~: j2 H8 j. W' Y, n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ i" p+ W7 T9 C
part := @.transpOrder;
5 n2 X! z7 _7 B% x: q B8 m part.move(@);-- load part
& |( K! N! Q. h6 i3 A7 c% Q4 r, x @.CurrIcon := "load";
! ^# L' L+ b7 w0 M# C GlobalDistObj := part.globDestination;$ _! C/ x& m; _3 I
assignLObj := rgmanager.rgAssignL;
4 Z' h1 M D, `$ o+ z row := assignLObj.getRowNo(GlobalDistObj);
5 X- l. p8 H) B if Row = -1 then -- since 70
- W: A9 ?5 ?6 x6 L4 J& k% \! ] if lan=1 then
, O$ r7 L2 T* ?, _/ B' P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
N9 g% c, D0 e* } to_str("in der Andockstation: \"",?.~.name,"\""));
D! R( b7 V! p else7 l, Y% D, u- y6 V1 N F* n* k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# s' n4 A1 G% C6 c4 J
to_str("in docking station: \"",?.~.name,"\"")); 2 v) v! _ Y/ R" A
end;3 s: T8 D2 t: r) x2 b
else
1 b4 @6 z$ [9 ?- u% j% i @.Destination := assignLObj[1,row];
4 `( D4 J6 z: u end; ( ^" Z% @$ Q4 [4 t% x
newDirection(@);' {7 o& r" s/ }4 U; t& s
@.HasOrder := true;
8 m" S* ^+ p$ f! h* G# q end;& F8 C) P+ S" N% K5 ^2 g
end;' \" z2 g! P6 }
end; -- of the method* @$ p8 M _/ n
|