/* called by: entrance ctrl of the object 'track'
& ~% H/ ~7 [# a*/
$ f) `" f* T' |is7 w# Q- E+ ?( y& y( r/ a, _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ j7 I. F& R' I- d# tdo
+ P+ v' ]- f" D Lan := rootfolder.Internal.Tools.AOLlanguage;
% e' o- @" t* R3 }) m Z% c if current = @.Destination -- else return7 a& y) U/ Q f8 H \+ f4 V
then
& d. e8 H( F/ F% N5 K' T( W. H; Z @.Destination := void;
9 s' z* s0 F3 @+ N, X if @.occupied then
# L1 d8 L8 ~$ r8 @9 P part := @.cont;5 ]# Z- f5 G- R+ s, O
@.transpOrder := void;
; z* [+ e; s) H9 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, H/ B( R" A" t8 G8 j5 \0 ?& @) [
@,root.eventcontroller.simTime);
! c& Q; g, o; F) l* l. l& C8 Y; i @.HasOrder := false;
E8 d+ B5 J, g- {/ p* l/ ?, b @.DrivingHome := true;/ h, V, C! g% O( k% I! v/ K
rgManager.tryToStartTransOrder;
/ K7 F w1 A) R. r0 I( `# }# q if @.Destination = void# l& E* T8 S$ k2 R `
then -- no transport order for vehicle @. W5 J: ?, p3 M# W
@.Destination :=* b1 n5 ~/ a! l8 k4 a- ]# j5 o( y
rgManager.nearestFreeStation(@,track.~);, I0 |1 K4 n; L8 `& f4 Q
newDirection(@);
& o: h8 H& b% J8 ? if @.Destination /= void then
: r& T8 a, q. x- y+ k3 H% H) T# h @.Destination.NumReservation :=
) t/ e+ u# z! v- ~ @.Destination.NumReservation + 1;
- h8 E8 C! N2 T end;; F5 E/ K2 I5 l% o
@.CurrIcon := "drivingHome";( i. v" v" j Z8 T8 d8 a+ A* c& o
@.DrivingHome := true;1 L( _- e) o$ s4 }) `& s% j
end;
) y) t( p3 a8 {( j else -- the vehicle @ is empty, both vehicle and part are in the same dock station \1 H+ m7 ~% g: e5 d0 G
part := @.transpOrder;& n+ e) z, Z f# r7 x4 T
part.move(@);-- load part$ n8 T# y0 u* _, l. U
@.CurrIcon := "load";& A9 @9 Q7 C1 Y
GlobalDistObj := part.globDestination;
( Y, y$ o5 p$ z J0 t: S assignLObj := rgmanager.rgAssignL;! m9 f, ]6 [4 M+ |' a
row := assignLObj.getRowNo(GlobalDistObj);
0 W' S5 W1 O9 o- y4 T' x if Row = -1 then -- since 707 M, [+ A% E" f) w7 r# q3 ]
if lan=1 then
5 r/ C! Y3 s& B; A5 N, X8 G3 G% Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ W, G2 p1 F2 v2 Y7 P to_str("in der Andockstation: \"",?.~.name,"\""));# N. P4 ~+ y0 @# x
else7 F5 J6 t, [1 {" b% f" ?- Q" G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, U1 L2 t# f9 A& U2 K+ ] to_str("in docking station: \"",?.~.name,"\"")); 3 X! s; K! Q! n
end;
) T' e: l( b2 O9 @4 q2 t+ P else2 U" H4 `. p7 k+ b
@.Destination := assignLObj[1,row];! ?1 g+ o& U/ h: F! U
end;
1 r: [& o1 i3 a newDirection(@);
6 }4 D6 z t" e, G8 T5 X, a7 y @.HasOrder := true;# E1 e* c8 T1 l L
end;' O# W8 Q, l) O! O
end;
+ ^) ]4 ?% k3 E E6 nend; -- of the method
5 P3 a3 U$ A% {- K |