/* called by: entrance ctrl of the object 'track'/ C4 K7 j. ? b$ _5 U
*/5 n- R5 J& Y* j+ E8 U4 M, x
is
. j& t* Z9 x& U4 H# y& [6 c0 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# g7 h& } P! W0 z6 f9 O$ k; ddo, Y* \. _6 k0 t) i" G
Lan := rootfolder.Internal.Tools.AOLlanguage;
% I9 |, m4 h+ P9 s# V$ G if current = @.Destination -- else return
8 Y" Z$ \ b6 C4 m then* v6 y# R* y1 b9 y% {
@.Destination := void;
9 ^: V1 C0 o3 Z2 d4 S if @.occupied then1 a1 u% Z3 A; ~5 M1 B
part := @.cont;. H' e* Y) d6 z9 [, T( G1 f
@.transpOrder := void;
- \% M* c5 Z8 n8 t& F* y6 u) |" a/ B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 |5 X) V* E3 }# N% O& ~9 X
@,root.eventcontroller.simTime);7 I/ n8 h1 R/ g( D; y4 b
@.HasOrder := false;
# y# ]3 L) Z7 i9 y/ L @.DrivingHome := true;
2 I7 }! j; G& d0 N/ z' U( d rgManager.tryToStartTransOrder;
( ]9 N: p7 ^: J8 M: E1 U if @.Destination = void& T y% \1 N9 o$ [# S
then -- no transport order for vehicle @
) n# m$ n2 e3 ]' G( ` @.Destination :=4 q- ~9 q2 ]6 c7 p3 B
rgManager.nearestFreeStation(@,track.~);
0 D9 @% W5 M% _7 J+ u0 R) @9 Q newDirection(@); " z' C7 n" |! H0 U9 ^; W2 L
if @.Destination /= void then
) x8 G+ I( g" A, J6 O# s @.Destination.NumReservation :=
; I7 p! R7 D5 z* j2 H( m0 I- p @.Destination.NumReservation + 1;
S: p1 J. [& t+ Z6 T end; p2 |& u$ |) M
@.CurrIcon := "drivingHome";
+ j! r: s: M, ^ @.DrivingHome := true;1 ?0 Y6 |( Y' a
end;1 }" F% c8 U9 t7 w. D- R: S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 q7 X; w( a( k: x/ d, c
part := @.transpOrder;
' q% W2 g6 U* F, w. l3 M part.move(@);-- load part
p& b8 e7 o1 h @.CurrIcon := "load";3 v u6 f! }1 d/ s1 J. O0 W0 F
GlobalDistObj := part.globDestination;
3 h% S" i3 }9 P5 C assignLObj := rgmanager.rgAssignL;( V- A# x- J# q1 l0 w- y
row := assignLObj.getRowNo(GlobalDistObj);
8 c( h/ k) b R0 Q1 J- R' L if Row = -1 then -- since 70
/ z3 R8 O- \5 U1 |/ z6 O3 S3 r+ X+ t if lan=1 then
, Z0 H" }# F$ m, [& V$ Y& ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& s2 m @# I+ M5 p$ I7 B6 [: s to_str("in der Andockstation: \"",?.~.name,"\""));& |" ^& j: Y0 @% {7 F2 t
else, p' g! Y; x |- W! m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 M) U3 v4 d, `6 g to_str("in docking station: \"",?.~.name,"\""));
: E0 C' Z u' M7 L E( L end;, h2 u9 Z! k3 {5 }7 [6 G
else, \4 l; ?& T; A; m: v! s8 |
@.Destination := assignLObj[1,row];, m) }' _5 s9 |% U8 M) _3 b
end; ; v% f; A/ C/ X/ O8 ` `+ u
newDirection(@);* i! N/ q6 u- p: @2 w% U9 d
@.HasOrder := true;( @: Y' ~4 \9 E
end;
* C8 P& j6 m6 X( O+ y% o9 I end;" Z7 a" S; W7 f( q. q$ Y3 r
end; -- of the method+ n# m' x0 W+ P4 Q' r- H1 X
|