/* called by: entrance ctrl of the object 'track'$ M" f* L! K3 s7 ~4 p- g0 [
*/2 I/ x, K. S' s7 ]! }
is
1 F0 x! Z0 U8 Q) @& W part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 ~) i6 {6 F& k0 {: g1 c6 E
do
' p% n* H/ N- R/ S2 n) ?2 H3 _9 q Lan := rootfolder.Internal.Tools.AOLlanguage;
( i2 N% A4 E/ \/ x9 Y' \ if current = @.Destination -- else return
3 t5 w* n9 ]7 X2 r$ ? then( {- c+ k, t% n, z% }* \
@.Destination := void;! U5 e6 G8 E% ~6 `. ~, Y
if @.occupied then$ g2 a* i- a4 N
part := @.cont;8 X# |: a7 R2 j" U. x
@.transpOrder := void;
0 ^9 x: c( d" A) C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ?6 g1 I4 ~) b
@,root.eventcontroller.simTime);
2 E# m" I# c# M% [9 v" V! U @.HasOrder := false;3 u5 Y, N$ O' N! x) i4 @" t
@.DrivingHome := true;& l, @$ i/ r2 t+ q7 f
rgManager.tryToStartTransOrder;
; V3 M$ X. \" o7 T if @.Destination = void
& E9 R3 O! ~! l G+ M& k then -- no transport order for vehicle @( B- e1 I- ^. L% f
@.Destination :=! I6 G5 M4 O" }" G; |# K5 w: E. W
rgManager.nearestFreeStation(@,track.~);+ l; W% @# F8 P: o" k4 c! }
newDirection(@); 9 P- r. k0 W2 h5 G0 @" ~
if @.Destination /= void then/ G5 y9 g$ D2 y7 Z
@.Destination.NumReservation :=
# w) W: v' h% | I; A0 ^+ f @.Destination.NumReservation + 1;* |: G5 P3 J* @8 A0 y/ f. h% z) |
end;9 n& K" T/ Q k" r0 t6 M
@.CurrIcon := "drivingHome";
! V& V- p+ u6 p$ A7 s$ y @.DrivingHome := true;
& W+ _* U) r4 e; T2 `) H3 |( a end;
5 J' R) ?3 w; C5 w/ P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 L+ q( j6 n% p/ |) s, r9 K2 O part := @.transpOrder;
& e6 c0 k3 j* g/ p. O part.move(@);-- load part
0 @1 C3 ~! u' ]3 R9 { J" m @.CurrIcon := "load";
, G# Z: Y& f- R2 D( e5 ] GlobalDistObj := part.globDestination;
4 m9 f6 S* ]' j2 n assignLObj := rgmanager.rgAssignL;
7 _5 V* p1 H9 N2 i# ]6 C7 ] row := assignLObj.getRowNo(GlobalDistObj);& b2 _, K; v l! E
if Row = -1 then -- since 70
$ R; u( _0 Q" G' u+ T. C if lan=1 then
/ ?& |, m! W- A! s2 @7 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# D. I! U* h2 D3 K
to_str("in der Andockstation: \"",?.~.name,"\""));" O/ ?8 x/ N/ j+ r$ I/ Z
else+ J7 I) X6 f: Q2 O% `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 q+ q: `" Q& b+ W to_str("in docking station: \"",?.~.name,"\"")); 9 {8 X6 s) A6 ]: C+ [9 ?" Z
end;- y- X, W8 O* G/ I7 k
else; ]1 O8 ]# `4 h4 \' }' i
@.Destination := assignLObj[1,row];0 U0 v" L/ \# {# E8 q
end; ' Z6 L6 e1 X3 p; a* t
newDirection(@);
9 A5 q9 R# p, r5 P$ P1 K @.HasOrder := true;
1 } U6 W z9 k; u2 _9 D end;
; W9 y3 I* }! ^$ [2 |- P end;; { k" S) E7 `
end; -- of the method s- k" @( m4 c( @5 M: u* m
|