/* called by: entrance ctrl of the object 'track'. {; t6 L7 D: Q% l' Z/ S) S
*/
' e% ^4 P7 K5 P! O, L( t5 Nis, n' s6 S# q0 a7 h+ n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 [ L, s" D) ?2 f( F3 x& v# S
do6 ?1 `8 g- u; M' @) ^2 [2 a! d
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ m6 P8 ]$ `. [5 x; T if current = @.Destination -- else return1 H: `6 i: P5 o# d4 S
then
2 r; n B9 k. _7 e) X2 ` @.Destination := void;: e& `$ t1 W8 j; e% @
if @.occupied then
% }1 U/ W" \& L part := @.cont;
1 v6 I1 Z" q: P @.transpOrder := void;
, Y2 o. K/ B7 B% y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. J. N2 i) l" I6 u
@,root.eventcontroller.simTime);# G, @. g3 ?* u
@.HasOrder := false;4 q; r4 K# D; }" M+ D* c3 t: \1 G
@.DrivingHome := true;
, e/ j0 [+ r1 X Z. L2 y rgManager.tryToStartTransOrder;
. r, W. k1 w1 c6 Y- T) Q, U+ e if @.Destination = void) E. O* H" d, j# R
then -- no transport order for vehicle @8 h8 Z( g+ U1 d9 r- I
@.Destination :=* w: [( f- ]5 r# {, @
rgManager.nearestFreeStation(@,track.~);$ T* L$ W7 E8 t0 r
newDirection(@); + g4 |$ l/ c# W) H% h l2 T
if @.Destination /= void then
8 Y/ B0 U& `5 \+ f @.Destination.NumReservation :=1 K2 v8 x# ]4 e0 B4 G7 H6 l" a& t
@.Destination.NumReservation + 1;
- n$ @/ g5 Y/ P$ i" n a end;7 _, }8 J7 \+ J N$ I' J
@.CurrIcon := "drivingHome";
& Z3 g& `0 J9 T$ ]- Z @.DrivingHome := true;0 R$ X' q9 |% m z
end;& M0 D7 z7 y3 c8 ^4 n& `7 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& P4 @( I) T5 i- }# i3 e" @' ]
part := @.transpOrder;& c* m2 G- I1 w0 Q- |7 m7 k$ ^
part.move(@);-- load part" N- e% @0 P' o1 u
@.CurrIcon := "load";; {3 u: @' V$ v8 f. E
GlobalDistObj := part.globDestination;
2 M" k) B7 T" Y+ L assignLObj := rgmanager.rgAssignL;
_5 }6 a1 U2 V& u& V/ Z row := assignLObj.getRowNo(GlobalDistObj);9 a9 U+ s/ m0 l/ Y: L8 j
if Row = -1 then -- since 70) ?& e9 k7 w% A& I9 @6 C
if lan=1 then/ B- E) `! j* ~) _! z ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 r7 \8 P% j7 Q, q
to_str("in der Andockstation: \"",?.~.name,"\""));
3 Z( P! O' O4 F8 v else9 k! G5 P! y! o1 q/ h3 @& m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( Q& `1 H5 c: F. A+ `8 W to_str("in docking station: \"",?.~.name,"\""));
& Q7 x9 E/ L* u7 ]* z end;
A& `7 R. o, e3 y) Z else7 N6 P9 I/ b4 N# `; j$ e
@.Destination := assignLObj[1,row];
, O3 N5 c p8 [# Q end;
) _" y$ m0 L& K" N* X! v$ n; N newDirection(@);
/ j5 A4 ^5 H u8 K; h @.HasOrder := true;( o% m/ r' g" y f; ]. f
end;; k1 D( G) c4 c$ a0 S
end;
9 Q5 G- z" P/ q8 Nend; -- of the method
* S6 ?: r( N0 O1 c" N1 C4 u |