/* called by: entrance ctrl of the object 'track'1 A4 n; m, H3 S2 D
*/: u2 H7 B& A) V3 c# O
is
; o+ v/ s( E' ?) Y' C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& [* Z. h* D% g( q; f- o; ?do
; F0 U4 ] b7 B+ j Lan := rootfolder.Internal.Tools.AOLlanguage;
3 n, T/ T. H, |9 J if current = @.Destination -- else return, L/ \$ p5 O6 p' ]
then
! y! p$ c/ L% f2 M4 s+ @ @.Destination := void;
, q/ g1 o- |& c& h: r: @4 S- Y- [ if @.occupied then7 O! h+ }" A) p, h E" i. S9 _2 k$ r
part := @.cont;( b+ y; k; w1 V4 L
@.transpOrder := void;
' i* V P; B, b# f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ J; u! p$ e( W; L, \+ p( T
@,root.eventcontroller.simTime);/ {6 [' ]) I+ s: r; L; `( w
@.HasOrder := false;7 C/ y9 P1 e- a q& E
@.DrivingHome := true;+ d# X& G% _% Z) P$ Y) _2 x
rgManager.tryToStartTransOrder;
$ O1 ]9 N2 d" o2 t% [: t3 y if @.Destination = void8 q5 y+ V) ?, b( B- c7 U
then -- no transport order for vehicle @
; x# N- I$ ~$ P% p8 a3 L" g6 P @.Destination :=+ b# I h0 d M8 t. t$ |
rgManager.nearestFreeStation(@,track.~);7 B9 N! e( S: ?( H& @5 J
newDirection(@); # y% v* E9 Y1 k: F; M9 E! Q
if @.Destination /= void then
: M5 Q1 R. V! \8 C; G) V5 [ @.Destination.NumReservation :=- n) j( _7 }( L1 k
@.Destination.NumReservation + 1;5 B, y8 ~# p7 n* e+ L f
end;$ `/ y6 {5 ~) r& a* f, i! n
@.CurrIcon := "drivingHome";
0 e8 e: ?! M; {( K2 n$ ]2 F: R9 ] @.DrivingHome := true;% o) Z* M& V9 p* J# l6 M. k2 N
end;2 }8 g: o% h3 i& G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* F0 E; v% P1 S9 f, p3 T
part := @.transpOrder;
# z0 R m% c' U5 }9 `8 I5 a& K part.move(@);-- load part
) C* v* F+ f3 K/ d; k @.CurrIcon := "load";
! R7 h9 J+ q, L3 J. V8 u GlobalDistObj := part.globDestination;
, H6 W* Z2 e4 h; {/ e assignLObj := rgmanager.rgAssignL;0 Y9 w( i$ @2 b( r( N
row := assignLObj.getRowNo(GlobalDistObj);7 X9 @! S. i7 _/ x0 d+ j
if Row = -1 then -- since 70
6 R0 {) R9 {, _: ]' s$ n if lan=1 then' u% J7 o3 ^- X$ {( ^# h" U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 D8 x7 C1 v' K7 r! U" j to_str("in der Andockstation: \"",?.~.name,"\""));
o; r( A/ e- ~8 @5 u else
0 [/ ^& \8 ~( J" o+ ]% Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 L& T: Y3 R g( J4 X) w to_str("in docking station: \"",?.~.name,"\""));
0 n0 Y$ c+ B& r* f. d, |$ G end;
+ h: E1 U4 p8 ^7 A7 { else3 @: l- a1 f% N( Q. c
@.Destination := assignLObj[1,row];
* M6 P) Y! J' V& _, F end;
( I( l& P. W% f! B% w$ y newDirection(@);
$ `- ? a7 V1 y! t4 S j3 Z @.HasOrder := true;% d$ S6 D3 ^& A, n6 W, u! @
end;# G( o% G5 G0 z, n7 L
end;* A" T; A! d' L1 u Q
end; -- of the method+ L# b6 `) A7 q( r
|