/* called by: entrance ctrl of the object 'track' b+ u& b3 Y$ l; _- ~+ J; Y
*/$ l- E6 M4 @* I9 d2 M! V% C' e- j
is
! L" S5 Z5 e, X$ w h3 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 ^4 R Q1 e+ \ F
do2 c0 i: R/ ~9 z$ a0 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ s! b: K& N+ a$ ? ~; v; @2 W if current = @.Destination -- else return/ g, k# {& `* C; V
then
0 }6 R! _( U/ O; v& g6 J8 x/ P @.Destination := void;! O2 n- P( l* K! f# \- D& c/ u
if @.occupied then
2 ]; ` i: }- ]* R part := @.cont;: v9 i5 k5 Y( W
@.transpOrder := void;' |, `& O9 [; q" E2 {7 X) |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, ?3 Y# ^4 J+ |8 F1 `0 Y7 N2 H
@,root.eventcontroller.simTime);3 l% D1 n2 l* X9 Z5 _
@.HasOrder := false;4 F" y9 m! I3 g
@.DrivingHome := true;
$ C& i( L" \8 V! U$ e5 ~6 U rgManager.tryToStartTransOrder;6 d) L* F( y P, Z
if @.Destination = void
$ ^ G6 v7 r2 t" ^( H$ O X3 P then -- no transport order for vehicle @! W5 Y L1 F8 }5 c5 P5 {+ ~: k' a
@.Destination :=
# R* ^5 w6 I# ~0 `6 C rgManager.nearestFreeStation(@,track.~);9 M- \3 W2 z. i, D A5 E
newDirection(@); : c) M7 D- V* ^" C- U
if @.Destination /= void then, y$ Z! g; o0 V; n
@.Destination.NumReservation :=1 Z& h; Z8 v- G( R
@.Destination.NumReservation + 1;' h0 O4 } [# Q+ f: A7 t7 \
end;
D/ G2 x9 d7 g2 \6 s3 J+ i @.CurrIcon := "drivingHome";8 `: u6 V# o# s
@.DrivingHome := true;
3 Y, H6 `+ i$ M) K+ H end;
7 f3 m; l! s* s0 C6 X( M/ _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ M+ T0 p$ D1 d: r' V! V: v
part := @.transpOrder;
8 g: z ~# D7 h2 O part.move(@);-- load part
* V* z7 |% E: l/ s @.CurrIcon := "load";
9 V2 r" b, w. @- x0 p% r- U- j, _ GlobalDistObj := part.globDestination;' ^: L8 D* u/ X% T
assignLObj := rgmanager.rgAssignL;
5 w m; Y4 x- _# G. D; ^ row := assignLObj.getRowNo(GlobalDistObj);
0 u$ Y& m0 l7 T( N6 J. o if Row = -1 then -- since 70, A1 w' d C# C7 u3 ]
if lan=1 then
( o: ^1 n4 |: ~" E9 @5 H$ D0 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. w& |0 C( E1 \; C0 N to_str("in der Andockstation: \"",?.~.name,"\""));+ I& n* M, E( f! Q
else) E( \- F; R o0 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," n* `) t# j0 X0 f( C7 C9 P
to_str("in docking station: \"",?.~.name,"\""));
1 X' i- U5 W) }1 |5 R end;7 M- ^6 @5 X! e
else; H" \, H0 |, V
@.Destination := assignLObj[1,row];, ]* A4 x' h+ p7 h: H4 o
end;
; E7 Q" m; N! ?! c8 V. a) r4 k7 a& {0 P( X newDirection(@);: v- T* S( U/ X. {1 ]7 D/ x; V
@.HasOrder := true;% T& U3 {* H% I( s" i8 ]+ Y# W
end;
: v0 u& p" D+ D& U; A9 ] end;
9 C- V% w# Y. A" H `$ G8 ~end; -- of the method
6 h& W# T2 w* n# i; k6 t/ ^3 ^ |