/* called by: entrance ctrl of the object 'track'
( p+ ~% n3 ^7 f) ^: ]) l: |6 e*/7 I- h" n$ M% s( |
is
$ x4 D Z3 _% ?0 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. e( t# ?4 v9 t3 g I, b7 vdo
* N, V+ u( z. G$ h Lan := rootfolder.Internal.Tools.AOLlanguage;
% @* f! i7 _( i. K if current = @.Destination -- else return# K. s+ @& b, u! B* P
then
* s* V; @7 k0 `7 Y9 @ @.Destination := void;4 p9 ?# f. W0 P, C+ B
if @.occupied then: f e5 h! k% R0 I# c
part := @.cont;
4 u7 @/ b2 A7 A @.transpOrder := void;- J& i3 ~# U+ n3 e# r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 U0 a! d) g" J( m# U3 L! g7 E
@,root.eventcontroller.simTime);
3 F. b& k% _( a! q6 e* @3 z c @.HasOrder := false;
" H: Q/ k+ I& U @.DrivingHome := true;
6 S- J+ ]- V7 q" O$ Z rgManager.tryToStartTransOrder;. a2 E3 N6 ]: l9 v) v; b/ {1 t
if @.Destination = void3 b! f, j6 o% I5 ^& g) D
then -- no transport order for vehicle @( }3 [( r7 A- B X$ ^' l7 Y0 ~
@.Destination :=
3 ~! g H4 t7 H( W rgManager.nearestFreeStation(@,track.~);
; ^4 z; e% }- P3 s5 T! y newDirection(@); : g0 ?$ V8 ^ x- y2 p
if @.Destination /= void then7 Z' X$ \ h6 N/ o4 q5 e* w. `
@.Destination.NumReservation :=
2 J# I( h/ Y5 [6 q& p6 Y6 T8 q3 j @.Destination.NumReservation + 1;
6 c" j( y5 a/ j1 T end;$ p z+ u, ]5 C+ M1 G1 f5 \ k
@.CurrIcon := "drivingHome";) h) S6 x0 k8 U' g: M- h7 S# i% J
@.DrivingHome := true;5 \# N, Z4 @" j) d
end;
- V* k8 M; U# j else -- the vehicle @ is empty, both vehicle and part are in the same dock station. G( s; ?1 \+ [* s5 r
part := @.transpOrder;
0 p% s7 P1 P, A+ L" F% g part.move(@);-- load part% D2 v# ~9 ^" ^0 x
@.CurrIcon := "load";0 A4 ]/ \2 m; a- y$ D
GlobalDistObj := part.globDestination;) [# R9 a' \$ B% J, C9 S& G
assignLObj := rgmanager.rgAssignL;
1 ?& h w6 o/ v# d( J" B) J row := assignLObj.getRowNo(GlobalDistObj); H P; T% M% a K9 _" X: ^6 E: M
if Row = -1 then -- since 70
Q% D# e$ _" ]0 m4 h$ H if lan=1 then' }' ?9 S2 b; k9 r% @8 S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 E2 f/ a- c. F7 _# ^; B$ | to_str("in der Andockstation: \"",?.~.name,"\""));
. P" X/ E0 Q* S else2 r) K1 Y4 r4 U4 p; r( u# o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- p% z7 G, k) d% f to_str("in docking station: \"",?.~.name,"\"")); 1 q2 F- S5 E! Q3 v# l3 F8 F! d- M
end;
/ j/ ~& a5 ?: l5 ^8 ~* H else
1 m& `% u. U7 u0 a6 z( d @.Destination := assignLObj[1,row];
, ?6 K- w K* h: f$ s! ]3 h end;
! A, A! `7 C; q newDirection(@);
+ R, B# F1 Z. \4 ^/ R7 v! q @.HasOrder := true;
, O! }" V$ t9 ^8 l8 \ end;
5 C( `& `# G& C& k$ F; }$ y' s5 o end;+ r* O4 [ d# v6 o
end; -- of the method( w/ {/ k9 I8 H5 i9 d8 u' S
|