/* called by: entrance ctrl of the object 'track'0 N5 z: h. k; D3 d l! H
*/
+ d2 F f2 X5 |; ]) ?5 mis& U& a) C0 N# m; r# v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 o" Q0 k+ J" f0 q( fdo4 F ^- N8 r$ B8 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ E; `8 Z" j0 [+ X/ A2 v if current = @.Destination -- else return% v, A' }$ T! g- P @% E: F
then2 w6 Y, a. W7 @7 g0 B. d4 A
@.Destination := void;
- Q( z [- [, x D4 y2 t1 Y' T1 j: L9 g if @.occupied then5 P& M$ V5 w) n! @, Y
part := @.cont;( l0 a# z9 P: v& K" c& `: D) ], q9 h
@.transpOrder := void;
) ?$ f+ x8 e! Q( k z& v" ~5 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; [% x, W& ^& W' s( a
@,root.eventcontroller.simTime);
- G; U2 s' y& S* i- O7 P1 r" } @.HasOrder := false;+ k% q" v/ v) L# B$ j5 T
@.DrivingHome := true;
4 b1 O6 [$ Y6 R- Z6 ?$ N rgManager.tryToStartTransOrder;
1 L1 E2 A- Q4 Y' M( Q if @.Destination = void
# i3 U- b) b2 m% E" o" @ then -- no transport order for vehicle @0 o8 K, x' a3 L# G
@.Destination :=& f/ A+ ?# Z; W
rgManager.nearestFreeStation(@,track.~);+ c$ [: s0 [, D7 b, }9 F* E2 ?; s
newDirection(@);
, ~8 h0 X, o' ^6 T if @.Destination /= void then
2 j! ?% ]6 u% ^# k4 a4 d8 ] @.Destination.NumReservation :=3 b" s1 e/ N: `' E
@.Destination.NumReservation + 1;% J. W( B4 o. g- `+ l& B% G: L6 V1 M
end;1 k I1 I3 C9 j2 C" g
@.CurrIcon := "drivingHome";/ |: p$ v. m/ f- J/ J& t3 x. y2 h
@.DrivingHome := true;
, W4 `6 c W! H end;
2 R6 s9 B! ^$ o- F/ @/ O6 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 y) Q1 f# D1 L7 Z9 T7 O/ A part := @.transpOrder;
1 E6 H) |2 B2 e f2 ` part.move(@);-- load part0 ~ K- I/ j. w& f4 w% x' U
@.CurrIcon := "load";# V; p+ u b. f0 P/ g
GlobalDistObj := part.globDestination;2 `4 w2 g5 m: R+ x Y) ~
assignLObj := rgmanager.rgAssignL;
+ g+ H G9 t8 A, T9 ^! \ row := assignLObj.getRowNo(GlobalDistObj);
) e+ q- [ ?' u. x; K, H, }8 e5 I if Row = -1 then -- since 708 h0 d1 a" s& J2 k, B3 k
if lan=1 then
* [. x% j. J2 c4 f7 i5 a7 x, F. e3 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# z) a; [( G% B! \" ~
to_str("in der Andockstation: \"",?.~.name,"\""));! P) q$ v5 _1 X* D4 W
else
" b" }3 D, l% }5 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 e- q, r( ~3 ~ to_str("in docking station: \"",?.~.name,"\""));
0 P1 G2 B/ a! [( S# M$ @ end;
% b' s; n& q3 J) [) e$ z- ` else
; h6 R9 S% S, n( ~ @0 M @.Destination := assignLObj[1,row];
% @- V& x2 @$ y ^7 T end;
; ?. V6 {+ T3 j) C newDirection(@);
5 X. W8 F& U) y* z, t9 u3 K @.HasOrder := true;6 o2 |- [: h. c8 x: _
end;) R2 l, y' R4 H: |
end;4 E6 F2 G8 [) e: f+ E8 V
end; -- of the method
8 R& ^9 D& I% y7 E |