/* called by: entrance ctrl of the object 'track' B& z8 }% d2 J2 @
*/& f4 \& q% S! F' O' O
is
3 p3 w1 }- g! Z% p4 e8 n9 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# R" z1 P! v3 F# vdo
8 S; [7 w1 ~* z- s3 q# a" _: B* C Lan := rootfolder.Internal.Tools.AOLlanguage;
' v; c7 h, V, y' O if current = @.Destination -- else return
3 u, L! u, l0 z, b then7 D" E2 n- e, j( D8 u- ~! R6 C
@.Destination := void;4 P' i6 E: ]' e4 d6 ?( E% Q( _
if @.occupied then; `7 C0 I0 x D( p8 B3 Y6 _4 m; ]
part := @.cont;2 L. v9 d3 k8 E$ a" q% e+ Z
@.transpOrder := void;
) I v/ N7 @, Y4 E9 }5 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% t+ R2 F1 U/ J @,root.eventcontroller.simTime);
% G' @0 l' U/ ?, ~) p% n @.HasOrder := false;. D2 ?: \: J/ M7 Q7 h/ o
@.DrivingHome := true;
/ J8 ~& q$ @/ l! Q2 h# x- U, U rgManager.tryToStartTransOrder;" g' q H! g. q9 \% v7 }! W
if @.Destination = void
. e4 A, l. E' o' r then -- no transport order for vehicle @- K0 V6 H# O) \. q
@.Destination :=: R0 M# X- \$ K8 K0 R0 C. q: g
rgManager.nearestFreeStation(@,track.~);
* m8 r! l/ \1 h' c' n* s newDirection(@); 0 M# q( Q/ S( z
if @.Destination /= void then
" B J6 g8 X% T: w @.Destination.NumReservation :=4 q9 m5 d' n5 l T0 e: {- I+ g
@.Destination.NumReservation + 1;
. a/ `- P0 @5 d8 Y2 J end; g1 Z% w; y7 ]! Y
@.CurrIcon := "drivingHome";
1 o) k7 m3 l) K8 |; o9 N1 { @.DrivingHome := true;( X. k% g2 W C
end;) B0 g, K; |9 @$ h7 `3 l, G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 ?: O* g, _( y6 g. I4 ]
part := @.transpOrder;
1 H; e; M+ @$ T- R8 M part.move(@);-- load part
% R" C2 a- \% |% ^) b @.CurrIcon := "load";
- X8 x+ ?; h9 s GlobalDistObj := part.globDestination;
+ ?$ t! T/ L7 |7 s& t, l& y assignLObj := rgmanager.rgAssignL;
) _4 G; o; f( S; [! _; x row := assignLObj.getRowNo(GlobalDistObj); O( j) B/ {! z0 X' I9 P1 ?# ]
if Row = -1 then -- since 70
( Y6 y3 r3 R7 y if lan=1 then
- h$ ^% c y- b, v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 F, Y# f2 L5 U R: j; d/ t; z to_str("in der Andockstation: \"",?.~.name,"\""));
, A" O$ Y! y0 `0 k: x) ] else
- m+ S& k4 v- q! t) U) {% v4 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ J7 I; S" q3 D. t9 J
to_str("in docking station: \"",?.~.name,"\"")); & R0 ]- @1 C/ C9 z
end;. a! d0 t, H0 \ r: r
else8 o3 y+ o4 a j/ k2 c! W
@.Destination := assignLObj[1,row];
2 }1 w7 ^# G3 d) q end; 5 t1 U8 @/ i2 v: O5 l
newDirection(@);/ @# ]2 Z' m: c3 c8 N4 S: K
@.HasOrder := true;( ~" C% R5 M+ t/ i# t
end;
) {3 `" C: s, ^7 s) D/ i end;
9 L) b7 u1 L+ Rend; -- of the method
6 r g& h0 L: G |