/* called by: entrance ctrl of the object 'track'
, l" q* @0 |1 r# j+ d*/
' A _8 j( L- a$ Q; w, |8 Vis
7 b5 N- [1 P5 q- j part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 G! T( u7 E+ K
do. V! i; W9 g2 A
Lan := rootfolder.Internal.Tools.AOLlanguage;5 N' o) D9 W5 L
if current = @.Destination -- else return
; L- T" F1 m" O" f then ]" X; M# y/ o! N" F4 q0 G4 g/ y
@.Destination := void;+ \* }* \) W$ h( }$ X9 G, m( v( E
if @.occupied then5 e/ z4 m) r( T; Y* G+ b
part := @.cont;
0 x9 w4 F: S' ~' E5 v @.transpOrder := void;7 w- m |8 I! C/ I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 Z) Z* ?, u! d8 j7 }
@,root.eventcontroller.simTime);3 _) B# Q1 l6 _7 A# Z: \7 Q
@.HasOrder := false;8 T/ A. _) ?0 ~8 b; C% }8 e1 S, w
@.DrivingHome := true;
3 m2 [' f9 L. a5 j H rgManager.tryToStartTransOrder;
$ N, o" Y9 B1 I, [# i) p if @.Destination = void" @7 y" c6 `/ N! _/ w( U# n* j
then -- no transport order for vehicle @
" y2 H% i% w* d( c4 w" }* o$ A @.Destination :=
3 L8 X1 x F' X& ` rgManager.nearestFreeStation(@,track.~);4 V2 q% ?: y- g, i" T) |6 W
newDirection(@); 9 f2 `9 @, a) V( m$ Q5 ]
if @.Destination /= void then/ [0 S3 s' U+ t/ p
@.Destination.NumReservation :=
. x# O. r5 n1 X% Y9 D @.Destination.NumReservation + 1;
1 F9 F- N A" S* p4 Y7 u7 P end;( D r P6 N0 R% c$ \
@.CurrIcon := "drivingHome";6 ~" j) g, u$ o; M4 P
@.DrivingHome := true;" v: R e- l3 y% a
end;9 A3 M/ m$ x/ u% [6 \! U/ }2 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. m) f# b% A# |" b9 m
part := @.transpOrder;
1 ~4 k) @# u4 n. A: h# a part.move(@);-- load part
0 }3 }7 E2 l& ^& L ~ @.CurrIcon := "load";
' P0 P" S% g8 a: ?( a" \2 ^* Y- O GlobalDistObj := part.globDestination;- W+ e* F) s" |- x% a" T
assignLObj := rgmanager.rgAssignL;
3 u9 J! O2 i9 o' [2 j3 K+ R/ H row := assignLObj.getRowNo(GlobalDistObj);
8 r$ A( B, ~9 N' w9 n if Row = -1 then -- since 70# [- s7 {; A: Y9 \ ]+ a/ `
if lan=1 then
' M% S3 E( q/ q! V2 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* \. P9 V9 }/ Y2 a# {; z% a to_str("in der Andockstation: \"",?.~.name,"\""));
2 m' H1 S% W' D. s- H else
6 l. p3 N. z: ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
w: {+ \3 x# Y+ ~ E to_str("in docking station: \"",?.~.name,"\""));
( g! _/ y! @: J* L end;: k7 l+ ^4 k6 F, R
else
( o% s6 ^1 z" o. Y% R, Q @.Destination := assignLObj[1,row];( f. b% P" n# }9 H" X" C
end;
8 F4 X" F+ E& y newDirection(@);5 |9 a6 \4 X( P4 v/ \6 G) u1 ]5 M
@.HasOrder := true;
+ w0 x/ X2 {7 ?. A7 b7 k% C% x end;
5 i! u& Z! _7 [" ^# o4 r, d end;
7 G f* Z7 |4 M1 R, send; -- of the method
+ X2 U1 K# r1 L |