/* called by: entrance ctrl of the object 'track'
5 O2 v/ }$ S2 l4 B0 i. R*/5 ^( n. ^: q( i& s8 L3 |/ Z
is. X r" U: X7 t* C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" n* t# i% m# P0 b8 m
do
- q8 [2 f$ J$ m; l! A! y$ t0 J Lan := rootfolder.Internal.Tools.AOLlanguage;
& } H& [3 T( l/ X S if current = @.Destination -- else return
2 E0 T4 G3 e: r" A# h: ] then% B4 d. O9 r/ o6 ]6 ^
@.Destination := void;5 u' ^$ U$ i( u8 @ W
if @.occupied then
* K4 \* T2 N6 t- m7 O* ? part := @.cont;* d8 N: s1 ?- Y/ s
@.transpOrder := void;
6 j# c. |2 Q9 f6 M7 V* p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% T5 W5 r) k7 i! _) @ @,root.eventcontroller.simTime);
2 e4 i. I" {! y @.HasOrder := false;
* Q. U7 d# d4 y t @.DrivingHome := true; z7 r, s \' F/ J
rgManager.tryToStartTransOrder;
% J% ?: n: t# U5 a0 r! R1 U if @.Destination = void1 c* D% A$ r+ |' G! I* I) V0 o- T
then -- no transport order for vehicle @
; z- ~' B; R* |, ?+ R) x @.Destination :=! b7 y, I% J) q
rgManager.nearestFreeStation(@,track.~);# J) m0 d9 g( g* i
newDirection(@);
' V0 F! `9 e& ?; F; M! Q% y if @.Destination /= void then; `! Q) o# A8 q9 R( o
@.Destination.NumReservation :=( m# E" ?8 d5 s
@.Destination.NumReservation + 1;
1 j( A+ ]" {( D. S4 K end;
& j, u% h$ N+ S8 J @.CurrIcon := "drivingHome";4 I/ |" _" C: C; {
@.DrivingHome := true;
) G5 O q+ l2 _8 s7 M end;* M- C# d+ ]* m# \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( Q; b4 G1 D. A$ {: I; h8 i
part := @.transpOrder;+ F1 [" f& C {
part.move(@);-- load part5 }1 x6 l" t' `+ Q! h n' d. y
@.CurrIcon := "load";
$ l) N) b" @* z GlobalDistObj := part.globDestination;8 v6 `5 C* g) Y- ?4 v0 T }
assignLObj := rgmanager.rgAssignL;6 T- W W! G- Q/ r5 i4 }# g! k
row := assignLObj.getRowNo(GlobalDistObj);
- x) n8 }% J% W3 w& v2 {% | if Row = -1 then -- since 70
1 D0 i7 g5 H' ? if lan=1 then
4 H) @ S/ n* a; |1 Q% r6 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), p3 U& D, c. `0 t' r
to_str("in der Andockstation: \"",?.~.name,"\""));
+ M: y% N. e+ @ t# J' ^4 K- y else$ o6 n! ]; }0 c- v3 N" ~: y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 z1 S z" _' j$ q: U
to_str("in docking station: \"",?.~.name,"\""));
% ~7 y- e- f; o6 t9 B end;
$ \' c% w j; t, ^ else/ u' _/ _" m' n
@.Destination := assignLObj[1,row];
6 L' f$ g, _5 J/ l end;
6 Z7 ?! T8 a' h newDirection(@);
% i; p. X( K+ \+ h @.HasOrder := true;* L; Y8 B- J4 [
end;0 C! q) b5 T7 m; g) k6 Y' W7 d
end;
1 ~3 G% U% v8 ^7 ?$ K) o3 A) zend; -- of the method
1 ~! t) W0 H4 @& D. G8 q8 p* O |