/* called by: entrance ctrl of the object 'track'7 G) E5 I! M, d: q$ U* F }
*/
. ~& i/ \5 }" {2 [3 kis
6 P, I4 D- j, M1 ?0 t1 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 b4 O/ z3 i+ ~0 P: i% i2 ]5 jdo& [5 {' P/ g& H- ?% c) c
Lan := rootfolder.Internal.Tools.AOLlanguage;
: l& ?6 f" {1 M if current = @.Destination -- else return: L# M1 `& } i' ~" J c
then, u. P# M* D" V& d. [ K
@.Destination := void;
" S4 J: y) h. T- e' j if @.occupied then
5 D: {1 S. {% u5 j3 t part := @.cont;
8 o6 M# w# {/ t. {- P w @.transpOrder := void;
) M; i! e; @& a/ \+ U9 O9 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," m6 R% s4 X0 c" |' i
@,root.eventcontroller.simTime); J8 N2 r9 t ]
@.HasOrder := false; k( E0 r3 ]* ?: O' N6 ]5 q _9 t1 S
@.DrivingHome := true;; s, c+ M( |. S" F3 B
rgManager.tryToStartTransOrder;; d, i) n# g6 Q: E# y+ [' M
if @.Destination = void
6 K1 F, ^: T n" }: q# M. r% { then -- no transport order for vehicle @
7 v9 M1 r+ X$ E @.Destination :=
L# Y& R2 Q+ o5 x9 N5 V rgManager.nearestFreeStation(@,track.~);
" h& S5 ]3 I! e. Y newDirection(@); 6 X1 V3 u k: M; H
if @.Destination /= void then
( f# |2 U) V6 m$ {" o, P* J @.Destination.NumReservation :=6 P" m' m3 @9 y3 F5 R/ P
@.Destination.NumReservation + 1;2 J, s9 r$ P6 x5 {! }
end;8 r2 ?9 o) [7 }6 y
@.CurrIcon := "drivingHome";
) k1 v* f$ s" A1 A1 z @.DrivingHome := true;
8 J# u$ o M5 t* `5 h& ] end;
' @' A4 N) j8 {; r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Q9 ~+ d! _3 e2 R! \) E part := @.transpOrder;& O6 S3 ^# h. f, N3 [! g$ }( c
part.move(@);-- load part
9 s9 g& h/ _% |* F9 O. P @.CurrIcon := "load";
" i3 e- x7 \# Z+ c) o) ^ GlobalDistObj := part.globDestination;
; Q! k# ^" ^( s* A/ j6 d( \6 I assignLObj := rgmanager.rgAssignL;
2 D, Q$ T! B* h @8 a4 p' {' r row := assignLObj.getRowNo(GlobalDistObj);: Q; ~% w3 B) Q& h
if Row = -1 then -- since 70
+ B1 y3 q0 m$ _2 G if lan=1 then
% d5 m8 D. b5 F+ `! @5 ]5 U0 K# S- L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- z& a+ W0 V- _: m to_str("in der Andockstation: \"",?.~.name,"\""));
0 P% d7 E" Y" Q4 \ else* E" }. Z7 |$ i; d; d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% I8 Z3 r4 E. `- e; }
to_str("in docking station: \"",?.~.name,"\""));
! L6 k4 u5 Q9 G$ e/ K end;1 ?, ~, q5 L- W% g; z
else
" e5 W$ G: b% y& G: n1 q @.Destination := assignLObj[1,row];
1 S3 Y; }, ~: Y: b h. M" W end;
/ A c3 n9 m& x e" b newDirection(@);9 m7 l& Q% d) T' Q- o+ q
@.HasOrder := true;
' f5 ?; C" q% C" q- O4 h end; t; ]8 M; e" M
end;" f7 [9 n5 z, A' F1 H. Z" b
end; -- of the method
# J8 h/ A0 E% h |