/* called by: entrance ctrl of the object 'track'3 a. B& H" h7 X
*/- m$ m3 ~7 B3 [! K' R
is9 P+ O( v. P7 m0 c! s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! P) n4 e. h; A; q5 b0 i
do
( Z6 _# S# T! n1 h6 m Lan := rootfolder.Internal.Tools.AOLlanguage;% z- ?; i$ a2 i7 s2 Y5 @8 x
if current = @.Destination -- else return
5 q: a# _7 F' `! o; e* V: x7 {; O then
+ a4 f$ h/ Y0 s/ s# B- K @.Destination := void;
2 s* p) t. j( M# U if @.occupied then
. A, r$ D0 \3 i" a @! V part := @.cont;
! }. b! W. t; M- o @.transpOrder := void;
# J- Z- r) A' w- O: k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; b" V) Y& d" @4 ` @,root.eventcontroller.simTime);8 t9 F9 ^7 C4 \+ K% }
@.HasOrder := false;
, g: D2 g6 E6 O9 B- a1 z' o @.DrivingHome := true;- C z5 j! X3 }2 u5 p
rgManager.tryToStartTransOrder;
) L0 A. R* X! v! f y8 F$ k if @.Destination = void
5 F/ K& E8 n, M, a8 t: H& U then -- no transport order for vehicle @3 A+ _" o$ H5 L* |6 \; G3 e
@.Destination :=6 k* q2 I [& D( C9 j& h7 ~8 y
rgManager.nearestFreeStation(@,track.~);6 H8 P5 p7 ?% G& B" ]# t
newDirection(@);
' ?) m) k7 {& J; d7 F: e if @.Destination /= void then
8 z! w& m6 K& x) n @.Destination.NumReservation :=/ _, Y8 E' @" C3 L
@.Destination.NumReservation + 1;9 g ~$ M( t2 L o' J5 I9 e% n; N7 b
end;) K$ Q0 k# u, |: h+ d, g
@.CurrIcon := "drivingHome";
0 |$ i# h4 U' f8 G" C+ i+ W @.DrivingHome := true;
% h% X4 B# {$ C: e1 b }5 v! j0 z end;5 [. W) Q6 j' {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& D5 z4 ]# W: S2 u# |! K; ~ ^2 \ part := @.transpOrder; q( z9 h; t9 s* |! s: g0 R, _, }
part.move(@);-- load part
% r; {" m9 p# z/ V @.CurrIcon := "load";& D/ r+ ?& e8 G9 Z7 }. R
GlobalDistObj := part.globDestination;9 {. c3 e( ^: h J
assignLObj := rgmanager.rgAssignL;
! d5 a5 E9 i# H* ^' f- Z2 K row := assignLObj.getRowNo(GlobalDistObj);
& Q( I& m1 E$ T6 P if Row = -1 then -- since 70+ ~: W" i0 m; J/ @) ], ~' J' f
if lan=1 then, t0 V$ V# x1 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 [: z) I `) g1 ?5 e9 V2 S" } to_str("in der Andockstation: \"",?.~.name,"\""));
g. r/ A+ Z+ B& ^ else
5 z$ j* E4 R6 o7 ~. o# N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ q. Q4 d# L% r/ J' |) X to_str("in docking station: \"",?.~.name,"\""));
4 h% W( B9 }4 D' F end;. w1 ?$ J' L% _" K7 |9 l. b
else
% m; |# O5 `# {1 a! u @.Destination := assignLObj[1,row];
9 u+ i, ?* W0 b0 C) Y0 j end; ; C5 c( A6 l( g7 g2 e% A- x
newDirection(@); |1 U% I: }/ o2 l, Y! _/ {) k- T
@.HasOrder := true;6 Z3 L8 q4 f( i/ `! `
end;
2 @( h+ r& ^5 s2 H1 j end;1 ?! m0 ^: J0 h/ }( ?
end; -- of the method5 P' s+ _# c2 v& ^
|