/* called by: entrance ctrl of the object 'track') e( S& |8 ^8 f- p
*/0 K/ ~; _3 T& [4 ]- [* ?
is
# M( S K+ |/ s3 N @5 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ]5 U( N- s9 P6 Ado3 Y" S, T+ Y- ]9 i$ R- A
Lan := rootfolder.Internal.Tools.AOLlanguage;: `8 \# T/ @. e5 {* a2 ?1 u3 b
if current = @.Destination -- else return e9 j3 B, ?; \+ Z. f8 r% i
then4 N7 @2 O9 I: o( N8 J2 D N
@.Destination := void;" e6 C* ^6 x" ?0 a2 q4 F
if @.occupied then, M: D/ {3 H, r& z1 x. |. Q/ W
part := @.cont;" U B7 k" a7 f/ H' v( p
@.transpOrder := void;
1 ~, W1 _& ~! Q1 Q' Y7 x) l+ g$ n/ _$ D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 [4 h. R0 \1 q/ G. Y8 @% z4 O
@,root.eventcontroller.simTime);+ E, M! \0 K; u+ z7 D% s' Z: `* V; Y
@.HasOrder := false;, p" V( t) ]) z- j0 u
@.DrivingHome := true;
9 a$ L M7 y3 L0 f* D( z) U rgManager.tryToStartTransOrder;
* i" ~: y6 k, l if @.Destination = void
4 r6 z* m# K0 K# x# E9 Q then -- no transport order for vehicle @ B: {" g! K; `3 @3 V
@.Destination :=, q6 r* f, O! g6 q
rgManager.nearestFreeStation(@,track.~);
2 _' v* i# y/ q% A$ _4 c1 I3 r newDirection(@);
0 V4 z ]+ C7 {4 ] if @.Destination /= void then8 R6 n; J5 ?8 y1 o# ^
@.Destination.NumReservation :=0 B2 u$ J' V* `( ~; |( V) A: w
@.Destination.NumReservation + 1;
' d$ r1 p* i) v1 J9 C, w end;3 W) P$ f/ o0 q/ }
@.CurrIcon := "drivingHome";
1 M7 q( S- [4 X& ~% [" @ @.DrivingHome := true;
/ S& x0 N+ T6 n6 D end;; Y; `% e+ e" O! P7 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 ~# @' W' a+ x' d6 L part := @.transpOrder;$ L: J4 f7 ^/ L! M- ]; o
part.move(@);-- load part
" S$ R0 h/ L8 B6 b% E @.CurrIcon := "load";
% x( a3 m% t5 p0 W' a8 K GlobalDistObj := part.globDestination;
! n7 h3 `) e) L assignLObj := rgmanager.rgAssignL;6 u6 d' y) k+ B2 o
row := assignLObj.getRowNo(GlobalDistObj);( I5 t, W O! d
if Row = -1 then -- since 70
4 L) R) |+ W5 P if lan=1 then
2 ~8 G; D+ p! l# [/ a8 \- ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; Z0 A0 y9 Q: y6 Q7 i) }3 _
to_str("in der Andockstation: \"",?.~.name,"\""));
. m) [" R% y9 A C- O else9 S" A2 Q7 b) b: Q+ m+ F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( {5 t' e" g* f2 d$ t to_str("in docking station: \"",?.~.name,"\""));
; T' W; U7 S B end;7 I' j: M J" e. @2 {0 N
else
* Y* ]/ ^1 k6 k! b D @.Destination := assignLObj[1,row];
$ N; j0 N6 f' h; s6 z5 q* f, U+ Z end; 6 r* H# l, c: T! p( A* s( N' t7 c3 g
newDirection(@);
. y; |( Y, L' r4 M/ r/ a% I @.HasOrder := true;
! t& T$ _! a1 o+ ^ end;
! E3 j- }' g' S" Q1 O% q end;3 j: c/ d& l7 s( K
end; -- of the method: R# C4 _0 |6 m& t) p
|