/* called by: entrance ctrl of the object 'track'
2 i) |/ h9 s8 L" ]7 l*/
8 H! H4 X9 p% [3 j& ?is
5 L1 `" l, m8 |; Z- W# \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- v' |3 \# T/ L% _) u6 r$ I( Ido
2 C1 z% _7 y9 P' O; q+ g Lan := rootfolder.Internal.Tools.AOLlanguage;
2 o% e1 z a+ O4 ~! s if current = @.Destination -- else return* x, [+ H0 w" t) W+ o- @" W3 R5 q
then! Q* k2 Q D" [6 K( m$ P8 s
@.Destination := void;
" u1 Z& b- a5 ]+ C3 g if @.occupied then5 f7 q3 ]5 B1 f2 T
part := @.cont;. ^$ w! ^3 c( K; t1 D# O$ ]
@.transpOrder := void;
, n. ]+ |: ?6 R" d" r$ } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 C' n+ W5 K) P. l, N+ p* v% `
@,root.eventcontroller.simTime);5 b$ l* m$ z% H5 w; c
@.HasOrder := false;
( N* }' y2 B7 I8 ~ @.DrivingHome := true;- O4 x* v* V6 A6 V
rgManager.tryToStartTransOrder;
. `& @6 {+ C" t/ F/ s if @.Destination = void! S' g+ X+ L5 f; Y. {
then -- no transport order for vehicle @
1 d |' F; J: |* b5 N$ p6 X; q0 F @.Destination :=
4 q( O& j5 [5 k2 i3 Y7 t! `7 } rgManager.nearestFreeStation(@,track.~);
$ L: R( i! u3 V K0 B1 U. n newDirection(@); 1 O; T5 B9 Y- V p- w
if @.Destination /= void then6 j3 I' P' o) z! F: f. a t
@.Destination.NumReservation :=
8 g; r3 e; `0 t6 \ @.Destination.NumReservation + 1;
! M% K% \2 a% }7 z end;
7 Q/ ^( `* a! i9 C& m: m @.CurrIcon := "drivingHome";8 v+ f9 J4 I) i( l/ V$ |
@.DrivingHome := true;% e, e! t* `4 @! d2 N
end;
8 s" h% Z9 P E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. Z q2 i }$ k5 f part := @.transpOrder;6 v$ [3 L$ n* @/ y
part.move(@);-- load part
: r; r1 h \9 f: d5 T! j @.CurrIcon := "load";2 E- R/ C- X' V ?( Y2 v6 \
GlobalDistObj := part.globDestination;
5 s1 j9 F Z. {9 [/ G" O! ? assignLObj := rgmanager.rgAssignL;
. |! @" r! ~5 E3 c row := assignLObj.getRowNo(GlobalDistObj); j) `& ?& ]0 }; N& Y) [& b7 }
if Row = -1 then -- since 70
: n) p- Z1 m m9 e& Q/ U- p if lan=1 then
3 J) z1 f- ]& H! v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ U9 w j, ~. u$ y' ? to_str("in der Andockstation: \"",?.~.name,"\""));
: I) @8 V( k4 l/ J else
! t/ Z# Z! x1 A; J6 ]. j( ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& o" h Q8 S. v7 E to_str("in docking station: \"",?.~.name,"\"")); 0 H$ a; i/ D# y* @
end;
. h+ K4 L4 [ {* g* j G/ `# O+ ]- h else
# O) c3 d" A/ Y" V @.Destination := assignLObj[1,row];
, e7 G0 m+ Q/ b/ }* y2 L end;
% p5 b& K+ c: ^7 o- k" T# @ newDirection(@);1 a$ @: z, [4 k2 [: U0 V1 W
@.HasOrder := true;6 V) e, b$ i q) O: `4 z" h/ a' @
end;
: V7 w! ]* ?2 y end;8 m9 q+ p6 g# K2 m
end; -- of the method7 t4 _; }$ K" \1 r# D$ |( S* L
|