/* called by: entrance ctrl of the object 'track'
+ ]: _$ a2 n1 L& j*/) \( f$ G& p: @0 u
is
: h; x# M8 {- U# v5 `- E part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 } B$ |# f* V+ c1 S
do
) s8 A+ E% b: D* f3 `# l6 V8 i3 J Lan := rootfolder.Internal.Tools.AOLlanguage;* a" O; h+ F' W$ e3 I
if current = @.Destination -- else return! s6 g. X% j8 \8 E( i5 v
then% D8 t/ [' m( p2 S/ m3 s
@.Destination := void;
& ~4 x9 j9 r+ l4 [* W if @.occupied then+ h, o# o4 g6 A& P* o0 w
part := @.cont;
2 k4 I1 O f" i" m% m- l7 u @.transpOrder := void;
; j4 {" ^( A" j G% g. A3 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; x/ S7 [! m( s8 Q* y @,root.eventcontroller.simTime);5 V8 w7 X- `) t: x% C
@.HasOrder := false;1 s/ p4 m Y/ J8 F7 Y1 U
@.DrivingHome := true;2 i' F% s( `: E
rgManager.tryToStartTransOrder;1 e5 l8 A1 P/ r
if @.Destination = void
& F5 g3 M# p& D* a then -- no transport order for vehicle @
7 }6 _8 A; ]9 ~* \, r @.Destination :=
/ w5 q# h; @7 D rgManager.nearestFreeStation(@,track.~);
# ? p. U. }$ f* t- j2 B# Y* s newDirection(@); 6 n8 o: K d8 y
if @.Destination /= void then
: u+ g1 h! Y7 j1 o5 d8 v @.Destination.NumReservation :=0 [. k# [/ J4 _5 }) e7 U) s
@.Destination.NumReservation + 1;0 A4 L0 o1 E- ]5 F4 n
end;" I8 s) a: J" @* z( Q) u$ Q1 k# e1 j4 ~
@.CurrIcon := "drivingHome";9 _9 |8 J/ d- Q T7 G- g8 c4 V
@.DrivingHome := true;
2 q5 q+ W. ?% Q4 I end; q: G7 {4 v* g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 O! L w: S! G$ ^
part := @.transpOrder;# H% P A6 z7 s5 E
part.move(@);-- load part* i& d N( A- w- c; G
@.CurrIcon := "load";
( T) Z- K! S: f; K* H GlobalDistObj := part.globDestination;
1 r1 Y& G# f- B6 f0 p, F* @( [; Y assignLObj := rgmanager.rgAssignL;
" w/ x% b# T% y. [( M row := assignLObj.getRowNo(GlobalDistObj);
# p2 J+ ], G' b if Row = -1 then -- since 70
+ ?1 H# p6 ~/ ^) |, l3 j+ T# q if lan=1 then
5 y8 L' {& V. k1 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 x8 J" w( \3 P- V$ n/ f# J1 j to_str("in der Andockstation: \"",?.~.name,"\""));5 J: S3 F' S) e, G J, U1 u
else
# p' T' ~+ k- K5 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% Q X7 h, W6 p% C- ~ to_str("in docking station: \"",?.~.name,"\""));
) E3 T0 O& e9 b6 N5 _! V+ [ end;
5 k h% r6 j: t4 Y else& K1 S( H9 ?3 S1 N ]3 y% K
@.Destination := assignLObj[1,row];0 x2 u$ M# h9 m
end;
- e, ?5 m6 X4 m# W( E' R% | newDirection(@);
6 }. B/ E5 d: ?7 y @.HasOrder := true;
9 `, q. D0 O+ j! B1 d, K; J0 } end;
7 b! B+ k; [2 ? end;
: \7 w+ F: e a$ g; F- M0 L2 v9 iend; -- of the method# w2 u! _) f- {$ H" C7 A1 l) a* l9 G
|