/* called by: entrance ctrl of the object 'track') t( @/ R5 L; j( M
*/9 e4 C0 l+ I. F
is
! ?" j' ]/ [. X3 [1 y/ D" B8 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- v9 W$ V2 q+ F+ Ddo( {" g. K7 z3 n5 t. H; [& M; b
Lan := rootfolder.Internal.Tools.AOLlanguage;* Q- K: F" L2 j9 I: N% b3 `( d3 a
if current = @.Destination -- else return
4 X8 `) C8 @6 T+ M! \ then
* X3 A7 r% n3 M5 D$ S. l @.Destination := void;' H F6 p: l8 ] x
if @.occupied then3 o7 B1 x3 q; j) k0 S
part := @.cont;
5 o# h) B" k& M% n" c7 \ @.transpOrder := void;/ \1 V- P2 O1 d, z2 Z( @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- }- v+ w- B4 @# C; C' ^6 C L- c$ L
@,root.eventcontroller.simTime);- S# X1 V+ \4 l+ M- k" @5 I
@.HasOrder := false;8 x; ~ [2 W+ i+ c" b
@.DrivingHome := true;
7 ^: D. y# i5 U! P# M rgManager.tryToStartTransOrder;
r+ B9 M) b( d: _% |* ] if @.Destination = void
! ~6 g* `/ c* f# n2 A then -- no transport order for vehicle @5 r% n, ?( O& S' d% ?- s( u+ I
@.Destination :=
3 S" Q) d( K" X. h+ N7 i- X O rgManager.nearestFreeStation(@,track.~);
" v5 ^- e) G/ i: G4 Y newDirection(@); 9 e- a& N5 R- y6 ^9 h
if @.Destination /= void then9 L7 o" V9 s2 |0 p) D$ F9 Z7 |4 F& N
@.Destination.NumReservation :=
7 j( g+ Z6 f1 d( W4 H3 F @.Destination.NumReservation + 1;
5 O' s) g* E; X8 W! u+ y end;
9 u. b3 j$ n7 T @.CurrIcon := "drivingHome";0 b; K2 d. r' C$ F6 r: n: U, b
@.DrivingHome := true;
2 \$ g4 ~6 [8 X' L8 A8 G end;
: o# w Q& j4 R" K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; N0 C- S! J3 k5 J part := @.transpOrder;
0 U) _- i5 k( P0 W" @ part.move(@);-- load part
6 p6 P) B) e/ {- I! c @.CurrIcon := "load";
2 A. R X- R" M3 F: M GlobalDistObj := part.globDestination;/ U3 |4 ~8 p+ Q1 @" }
assignLObj := rgmanager.rgAssignL;+ Q, W. P% P; Q l
row := assignLObj.getRowNo(GlobalDistObj);
! k9 d9 b; [; n1 ]% h7 N% } if Row = -1 then -- since 70
. Q; B1 b4 x3 a" V, o8 |, m if lan=1 then) q- \7 ^% t. J& }7 M' \5 V, v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ h3 I) {" R! C+ c) e2 H
to_str("in der Andockstation: \"",?.~.name,"\""));
" t4 q/ ^# x: X+ r/ F& n% | else
) F! L- z- M& I f3 u0 X2 s% N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! P" P3 @: W7 j! e d \5 q
to_str("in docking station: \"",?.~.name,"\"")); . `& s5 c9 o; S1 O5 J( A! b
end;: E0 F5 ]0 y! U2 n7 A9 Y
else7 g' V7 v; m* X, P- E/ t
@.Destination := assignLObj[1,row];7 H/ Z: V& g1 r
end;
! j; G9 {% ?9 r9 _( D1 E& I& H7 d newDirection(@);( U2 t! N& l0 Q% |: k
@.HasOrder := true;
) ?# a& C+ X2 x: T, u0 E8 I3 Z | end;
9 w9 y/ G* C' e* Q5 ? end;1 n4 y- i5 Z* m* o
end; -- of the method! O# ^* X* X4 U
|