/* called by: entrance ctrl of the object 'track'
/ ^# n( _4 n, F7 b7 \*/
/ V. j0 E4 L* w/ h. T4 r# e% e4 tis! g& \4 i \! B: z- X1 B* W6 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: c0 e1 k% h+ F# N/ R) r+ L0 ndo
i& y5 i3 ~7 [ Lan := rootfolder.Internal.Tools.AOLlanguage;" `; b$ ?- Y' M9 S9 S
if current = @.Destination -- else return
0 L: S- j+ `( P" @' S. p! m then
7 |: t% j9 t- X- } H( m( S1 C1 d @.Destination := void;! S+ p' s7 ~4 o3 B! ]: S' o
if @.occupied then
5 r) V9 b. O# M" E% J( Z- z6 R+ I part := @.cont;
& e! O8 s' W! U: h( Q. ` e @.transpOrder := void;3 i. m$ e( P& t b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 N2 e2 P8 D5 c% i9 M* o, c; l
@,root.eventcontroller.simTime);% J$ y( C8 U# o
@.HasOrder := false;5 P# r0 f' p, Z. H% R" o
@.DrivingHome := true;
, t/ L+ H, }- ^* p rgManager.tryToStartTransOrder;
3 U( q. | B2 f3 A" N. o0 \# x: i/ H" O if @.Destination = void
* Q( S% a8 ^* J3 [% R' ]! J- t then -- no transport order for vehicle @
% G' P5 T6 @( r1 Q @.Destination :=' e; s* R, I, ^: w3 i1 S B
rgManager.nearestFreeStation(@,track.~);
0 L$ s! ^. f. F% g2 D: N* K newDirection(@);
# P( C7 p% q; Z. n if @.Destination /= void then
+ I$ ?( y7 f" V4 k% F# j& v% G% [ @.Destination.NumReservation :=
$ h; i: L( Y9 c7 I @.Destination.NumReservation + 1;6 M; J; L' e" \2 ^8 s
end;
$ T G) Q4 u; d2 E1 i# b& P @.CurrIcon := "drivingHome";+ O# i* `" Y- t1 l9 t
@.DrivingHome := true;
+ k" O2 M1 s! [. l* H end; N$ A9 K4 D# f6 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; F; ^. T9 B' k5 a* O1 U part := @.transpOrder;3 b. d( E/ P2 I' U I
part.move(@);-- load part: j" {1 F! u e- w, y
@.CurrIcon := "load";/ }4 S7 D% @+ O2 N% U
GlobalDistObj := part.globDestination;
0 q! Q9 O, v7 d! P1 P assignLObj := rgmanager.rgAssignL;
/ A% Q1 V% O$ n2 }9 j) F8 ` row := assignLObj.getRowNo(GlobalDistObj);
# r+ F2 q" ]' C& B, f5 G8 \# d if Row = -1 then -- since 70( b4 m9 N# W! b/ L
if lan=1 then
; s2 T: X2 F8 O# M2 @7 H7 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' @4 j( M4 j! X- I$ T' u to_str("in der Andockstation: \"",?.~.name,"\""));) g. i9 X1 }0 k2 M
else
4 a: @, B8 T: j% y( m' U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 l- A3 B$ p2 O! W2 S1 p) n
to_str("in docking station: \"",?.~.name,"\"")); % m8 ^( F2 U& g
end;
: F- ~/ |* ]2 H% P else. Z. o! f( W; U7 o, i* q
@.Destination := assignLObj[1,row];
8 `1 {2 {) f2 r5 E9 m# \/ o+ b. [ end;
; ?, ^! b# [9 H) f6 n$ ]8 K newDirection(@);
) Z. T' t9 N, F0 q @.HasOrder := true;4 ~" s4 d& e9 v. Z
end;& [1 i1 B' x$ q- i
end;7 F3 E: w9 V4 @8 V
end; -- of the method
" q/ |) L0 E- q. z |