/* called by: entrance ctrl of the object 'track'+ M5 F* e, f( v+ Z. T- I4 \
*/5 v/ h- G: z3 d, T$ v7 v
is& }# y! U) v$ H$ N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 f" b; C% r& M% U! W
do0 g- Q3 ^/ J3 c. [$ h0 C7 A" v
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 v* I/ {" ?; c* O5 X& s if current = @.Destination -- else return% [: |: R9 n9 ]1 B
then
& r- }7 g6 _1 x1 N9 J3 _! M @.Destination := void;
1 K( R6 G; M: O u if @.occupied then
% p) N7 G; C9 D N# J7 m part := @.cont;
J' \5 B% C2 X+ f4 k+ ~4 X @.transpOrder := void;3 I2 ~9 s7 J3 M+ T% J- z7 B9 d- t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( L) X g4 T) |5 v4 F" b+ h @,root.eventcontroller.simTime);; d" m& \' V, F3 J- I# \
@.HasOrder := false;5 _. R8 _' Q9 _/ K8 d( D
@.DrivingHome := true;
9 C0 }; P: I$ E: {2 ?1 r6 U; A rgManager.tryToStartTransOrder;
3 I: n9 B) E0 y, W if @.Destination = void
5 b0 V# s) U7 y then -- no transport order for vehicle @7 e3 F' k1 H; c2 ]) z0 M0 [
@.Destination :=: N0 ]5 m, o, I/ F
rgManager.nearestFreeStation(@,track.~);1 ^2 L, P$ P4 j$ h( N: n
newDirection(@); / }4 n: W! O1 L8 N+ W7 B% x/ v
if @.Destination /= void then/ {9 d" c2 F) m/ O
@.Destination.NumReservation :=2 l+ _, ^5 E* P- I! f7 i0 n, n$ z
@.Destination.NumReservation + 1;2 ^' O5 P2 B& ^2 J+ |- s
end;& ]5 z1 A/ i/ g0 n% V
@.CurrIcon := "drivingHome";
9 h. R, d% j; v7 r0 e/ X @.DrivingHome := true;
5 d. ^% h- \; c+ P8 e3 R end;# \% v I( a/ z: A. {- I6 Q. C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ \6 c7 _# x3 J part := @.transpOrder;
4 t. F4 t5 h; @ part.move(@);-- load part$ ?' C3 [. P. f
@.CurrIcon := "load";) d- g8 ]! K# ^4 L$ E% Z+ r4 }
GlobalDistObj := part.globDestination;4 `" L7 d' F b ]$ w D% @
assignLObj := rgmanager.rgAssignL;3 a( W& i _. t, X! k# T6 d
row := assignLObj.getRowNo(GlobalDistObj);& s) Y6 E7 D P9 q: r* ~& b2 K
if Row = -1 then -- since 70
6 q; M" y$ {& {5 }: ^, f0 p if lan=1 then0 W+ H. F# P, U+ |2 h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 _- `9 x8 [, n- i+ `2 T to_str("in der Andockstation: \"",?.~.name,"\""));5 y: w, h+ q) G8 U
else: V d7 e1 _/ Q5 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% n/ ]7 J3 B2 ~; n F8 _& t1 h to_str("in docking station: \"",?.~.name,"\""));
, m* q/ m$ `3 O6 ]: n+ d7 s V end;: i$ x' T3 w0 I+ C- a9 Y2 }' {4 i$ x
else
) C; M8 H- g) v, [7 I: h @.Destination := assignLObj[1,row];/ t9 ^ q6 c$ m( R8 _8 z; R. s; k
end;
/ ]- ^% ]) _- k9 J/ W1 K, O newDirection(@);! D0 Y4 s4 R4 Y* K0 ^
@.HasOrder := true;
( o* s, z- N' v0 c# e3 B" D( F end;+ k& y; ]( c* ~9 V& G/ b
end;
; J4 C! M- {3 ]$ @. {end; -- of the method
! y( L( F3 m% Y8 i |