/* called by: entrance ctrl of the object 'track'! ] A# ?2 y0 g6 y
*/. T3 d5 C; @- k4 p) Y+ v$ |) K
is
% Y: M0 J8 o1 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ O. `3 l! i2 i2 d- F
do6 m( x+ k, @% t u! ]" V* Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
. y+ ?' J1 [% r( s if current = @.Destination -- else return
- e) R% y5 D: J% x; c then2 c3 }2 C" ?" E0 f' _5 \( `% P' R
@.Destination := void; [* s* x0 B# [; g* U
if @.occupied then( W8 K! {$ [7 P2 F5 {5 [0 _
part := @.cont;
0 Q& k8 L7 p3 V @.transpOrder := void;
8 _6 O( ^& D) E# J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ q% i* U5 g* r( E! @. w, e. `! D5 } @,root.eventcontroller.simTime);
$ Z$ {; ~' f6 T. Q @.HasOrder := false;
% ^+ s, t/ B6 x- n. G2 S0 R @.DrivingHome := true;$ q5 r3 }2 ]! l
rgManager.tryToStartTransOrder;7 A0 i- p$ \( e6 A: W
if @.Destination = void. U9 g9 m5 _0 M, n) G4 {
then -- no transport order for vehicle @
* r+ V% j; o7 U( [& p4 m @.Destination :=
; ]$ q' R1 N8 }( K; @9 `4 N+ ~ rgManager.nearestFreeStation(@,track.~);6 c' l8 D# ^0 W
newDirection(@);
/ a5 j: z t9 |3 Y: O% ~! { if @.Destination /= void then, }% W0 g) `) Q6 X
@.Destination.NumReservation :=6 d( M S+ z4 Y2 \+ M2 n+ y: k- w, n
@.Destination.NumReservation + 1;
. K( k- N# S( _ h% W" }4 t end;
; X3 Y8 p7 p+ L E# b: m e @.CurrIcon := "drivingHome";9 w: b: N8 P9 P- n
@.DrivingHome := true;+ y! c. Z! W [) D1 E
end;
, W5 f+ I" ]& A5 b- Q- W else -- the vehicle @ is empty, both vehicle and part are in the same dock station" S) K" S o0 }# M1 Z0 h
part := @.transpOrder; ?' {2 g K/ i8 a
part.move(@);-- load part
. o1 _; u& M9 E! T+ M @.CurrIcon := "load";5 x( h! B" A+ z' g/ Q% z" [
GlobalDistObj := part.globDestination;
! E. e0 N9 c) p assignLObj := rgmanager.rgAssignL;8 A; c" N4 a; \1 v. m- W% p
row := assignLObj.getRowNo(GlobalDistObj);
( `: V ~$ z( ?( p3 l if Row = -1 then -- since 701 t5 A2 P9 w0 M, R. E
if lan=1 then
* m5 ]0 ^! U. h2 R( i' q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) C/ j" O. O6 l2 |6 k- b to_str("in der Andockstation: \"",?.~.name,"\""));6 O- ?% P! [" T: v8 h
else
; u/ x( d4 f( I3 n" R9 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% t% ]9 O4 K, Y7 ]- l" H% j
to_str("in docking station: \"",?.~.name,"\"")); 1 w. C; {5 N+ g9 O7 c$ {
end;
) n( k( n6 G3 z2 D" H/ W else
0 M# H" F+ `& z; j6 @" m @.Destination := assignLObj[1,row];* b, W; U* R2 B0 C
end; 1 {* e) j1 R. [; V
newDirection(@);
' r) v4 Z9 t. ?- X& m @.HasOrder := true;: ?0 M! A# Z0 P& y
end;) d N* y. ] M
end;( }# a% E* d. R+ i6 x
end; -- of the method( C0 L$ `* M$ b* O
|