/* called by: entrance ctrl of the object 'track'
! O# u4 q7 t' u. I3 \1 c+ N5 J*/& b- V$ ^" T# c4 G
is
( S( I8 h1 E: E S3 x/ \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 i% y# O$ D0 N; |) N8 e3 Q
do p, E) i+ C# H' c5 @
Lan := rootfolder.Internal.Tools.AOLlanguage;
# {6 o% q( x$ m( X if current = @.Destination -- else return' b1 R. h* {" [* J7 F) t( i5 \
then9 f1 ~% V& m3 D" A! k S
@.Destination := void;
$ K' g$ P' _2 y$ B( C! Y if @.occupied then
7 \: }; q& L" j# l( H part := @.cont;
+ Z3 O; s& r3 P m- m6 Q @.transpOrder := void;. G- B# k6 S. @5 d& s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 Q7 M- [: l' g( z3 |7 `4 ]
@,root.eventcontroller.simTime);7 x$ S6 Y8 y: M8 p3 v
@.HasOrder := false;" F- Z% O8 O7 g$ ~, n8 c* l0 p; M
@.DrivingHome := true;
/ R: ^* e4 ~* i* y rgManager.tryToStartTransOrder;
4 N& i) \! |" `! Y7 A! w9 P) [$ g6 l if @.Destination = void
9 {8 C) [. s( `. K# M& M, a then -- no transport order for vehicle @" A# k& A" l# C1 j+ h
@.Destination :=" U! v/ } k# a a9 H
rgManager.nearestFreeStation(@,track.~);
; O' D7 K: H6 I- Q" k6 Y newDirection(@); - g# N x/ r( y; _2 r9 W
if @.Destination /= void then
h; z9 w) K& }' _/ _. N! m- d @.Destination.NumReservation :=
' `& H+ Y; S( H4 s# f @.Destination.NumReservation + 1;) d6 ]( u2 S( E* X
end; T# @' B6 R4 ]* |1 t; t/ }
@.CurrIcon := "drivingHome";
% D5 X0 {2 c* U# i @.DrivingHome := true;4 B# h( _5 P4 H9 u& I- e6 J
end;
G1 f3 B) y! i0 p; n- b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. f0 \- @7 @0 w: z# t! m part := @.transpOrder;
; A: A4 C; U8 a part.move(@);-- load part
' \7 d! s$ E4 j1 R8 g @.CurrIcon := "load";5 v$ W& W; c- c" V$ O
GlobalDistObj := part.globDestination;$ v3 c! G& D d- X9 ~5 C7 b
assignLObj := rgmanager.rgAssignL;
' [; Y. x) C: c. {2 Z- H row := assignLObj.getRowNo(GlobalDistObj);* e3 n# l& T0 K# G w3 l! @7 ]: Y
if Row = -1 then -- since 70
5 z' q. c1 k: a6 S6 t if lan=1 then+ C4 |/ I3 }- T u9 z9 D6 k, Y) U5 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ A% N- u/ g M3 C* z. B. j% y2 S to_str("in der Andockstation: \"",?.~.name,"\""));
! u) H; E* ]) ^ else* W0 i9 x+ \' v5 i* t( \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," l1 G& L, A- d3 X B D
to_str("in docking station: \"",?.~.name,"\""));
: a$ x2 J- s' }( y( C1 ] end;
. X$ Z! O }* _+ l3 _/ A( P else
3 V: c8 }7 Z, j& ^/ H8 v @.Destination := assignLObj[1,row];( Y1 I' u" I- L9 R/ E
end; ; ]! x. c9 s- x* o/ z
newDirection(@);* S4 w7 G ?( E1 l5 I
@.HasOrder := true;
) X0 l5 Q& }' L# M end;' C: S# I* m r6 i4 p
end;
( b0 w- u6 B+ C; Rend; -- of the method
5 I! I( i' ^3 i, O0 U |