/* called by: entrance ctrl of the object 'track'
5 ^% r3 `, s* C9 E, H- R6 ~7 U*/
- r( O C; a+ Jis
! V7 Q! D# ?. @- b \$ N8 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;, a. s. E3 B8 M0 K
do( E+ D& B7 g: m5 w2 Z: @6 i" ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 o# w R9 |8 C$ ^) Y if current = @.Destination -- else return5 n) u$ B: W, Q" }& p8 A. U$ t3 I
then
0 u* { t, m# V0 T @.Destination := void;
& o* w- Y( O4 p if @.occupied then- {* x- [' n$ y, ^ i" M5 O3 g4 `; Q
part := @.cont;& K4 _( S2 ?8 V6 L
@.transpOrder := void;
# e8 b/ M5 Q* h4 V( W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 ~! v3 M) W# m
@,root.eventcontroller.simTime);! A9 U3 y3 l* V$ q) E- k+ M1 O
@.HasOrder := false;) c% R& u1 T' N; N
@.DrivingHome := true;
: T, m% D- P# W" B k( [1 \, o rgManager.tryToStartTransOrder;
& g* x+ H- u6 x+ u if @.Destination = void. Y0 h/ {+ y1 i6 }! l
then -- no transport order for vehicle @
6 N# @& J' d- P3 \0 C7 K2 Z @.Destination :=, X. k3 v1 m+ ?5 V1 E
rgManager.nearestFreeStation(@,track.~);( \3 q8 B8 v3 T O; X% W+ S* Z3 J
newDirection(@); 9 i$ S/ U. `4 q3 _, ]6 E+ z; x& n
if @.Destination /= void then$ X: p/ S6 Y6 q6 ]2 Z
@.Destination.NumReservation :=* K( l) r6 R9 \
@.Destination.NumReservation + 1;+ {2 G/ P5 I+ ?8 B3 h" c
end;
" A; p" d# _- `6 y3 f @.CurrIcon := "drivingHome";
/ J7 J0 O/ C# T% @1 P @.DrivingHome := true;8 I4 U% x, g S& Z: |* m8 R y
end;
. ^5 k- `7 ]0 r! T& T/ d9 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 N2 c4 Q. e- g/ ?' V! n- c part := @.transpOrder;7 A2 C I. E- r# V( `
part.move(@);-- load part
1 W# T( J' x& r& ]7 K% U& s @.CurrIcon := "load";
+ M9 z8 z( m( X) }+ l( `7 _ GlobalDistObj := part.globDestination;
q8 p. F& i7 |5 H' Z assignLObj := rgmanager.rgAssignL;% L* Y* m- s S% t
row := assignLObj.getRowNo(GlobalDistObj);" b; _9 k5 W& h) b# ^
if Row = -1 then -- since 701 k! J$ ?, G$ X$ C
if lan=1 then
? E2 S" [- X4 C6 m+ R& K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 |& ^/ ^ P( ]8 a" a* J) f to_str("in der Andockstation: \"",?.~.name,"\""));
1 Z5 `" L2 j' `9 H' C& m' i else
% N5 w- E8 R5 ?4 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ n- h, F: p3 o( O3 {5 C0 F* U to_str("in docking station: \"",?.~.name,"\""));
5 [2 s& X# ~$ W9 O5 O7 t3 o end;% j9 C+ @4 u* |+ O8 W& \. @
else" H; G& D, K, Y7 z6 z3 H5 z+ V
@.Destination := assignLObj[1,row];
% q. H- @5 ]0 A5 q5 P end; 5 | A' _" l" V) u! n
newDirection(@);
' s% h8 W) ^ q0 R7 y6 G+ r: A" r @.HasOrder := true;& Y" I+ _& K" e, R
end;
% J& Z+ ]% y9 Q6 Q9 {* p8 P end;6 M+ u" ?/ N# R3 `& J
end; -- of the method
) Q, o- U/ U0 Q& r/ Z3 @ |