/* called by: entrance ctrl of the object 'track', K. Y0 e' }0 J8 U: o5 F
*/
$ L9 u3 A% ^' t. B6 ~, y# ~is7 i( ^7 C" i& E; g' D6 g) t" D9 z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; C5 A( A) ~+ D6 j6 I
do
) |. B/ a: f% E Lan := rootfolder.Internal.Tools.AOLlanguage;( j! I4 X$ d+ P& J) W6 r* o
if current = @.Destination -- else return3 T5 r% Q8 Z' V
then
3 m$ A! l( Q4 \2 W( ~9 N @.Destination := void;3 t2 k8 x) i1 U9 y+ ?
if @.occupied then. s, U' R2 J+ ^: J; R) [/ C" m
part := @.cont;; B; r2 \) ?; v+ [! w
@.transpOrder := void;
! P K g6 H8 O! |+ m% Z) d# _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& J' V+ t; \1 e2 o7 v' s @,root.eventcontroller.simTime);$ I& y& B% D) @ M, W$ `3 n: c ]" U5 t
@.HasOrder := false;- H# O9 B4 h( x% u8 I! A; O/ k5 Q
@.DrivingHome := true;, Q2 ?6 g; u J
rgManager.tryToStartTransOrder;
d* A8 `. J! c9 @( E) W if @.Destination = void, e9 E; f# ]# @$ |9 g$ ~% s4 I
then -- no transport order for vehicle @
( `$ c" T9 i- r @.Destination :=) b) E5 |/ i3 ~/ p
rgManager.nearestFreeStation(@,track.~);4 p; b( g- s6 v
newDirection(@);
2 _# G$ \% ~7 e) w* w% u$ C* e3 J if @.Destination /= void then
o" x2 N4 |- {; e; a) `% Z# P5 ^ @.Destination.NumReservation :=
, \! r! A; e/ D G0 n @.Destination.NumReservation + 1;
& b8 X2 W9 l; \, `4 t7 ^; ] end;7 l' `" Z* y j
@.CurrIcon := "drivingHome";
- ~ N4 u8 w! H+ j @.DrivingHome := true;
% Q1 G! o, B6 u* a/ e end;
% C! T1 T5 I X0 ?7 {2 c) o* Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 G8 n7 W6 z" Z4 Z
part := @.transpOrder;
' t0 E9 w3 m, I' y* G& T+ U part.move(@);-- load part
+ ~# |1 K2 I6 g+ u" j7 {* m- Q! ~ @.CurrIcon := "load";
: H' n7 k, c3 L( v( x$ z: [) g( M GlobalDistObj := part.globDestination;3 B. r4 O$ c9 J9 |+ W
assignLObj := rgmanager.rgAssignL;' Q0 |" ?+ G( ^4 L2 ?) U, g
row := assignLObj.getRowNo(GlobalDistObj);
4 ]1 G1 f* i: a$ x/ l if Row = -1 then -- since 70
$ Q/ d' E7 a4 A7 m, w) }/ |. F6 T if lan=1 then
) y$ q$ J! X- n2 J/ |6 d. Y, Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 S2 c3 G( w1 y* \, d to_str("in der Andockstation: \"",?.~.name,"\""));- s1 m6 c5 Q& {
else$ ~8 t& Y% K: V& g4 X4 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' W! H- V+ T: w
to_str("in docking station: \"",?.~.name,"\""));
! B/ L. H3 \4 e) K end;
4 F) z( t( f! P# e. G" s else- A; Y7 s4 M# c1 a# B2 D- j
@.Destination := assignLObj[1,row];
4 N; W* A( z0 @& Z end;
2 z6 v' s3 D4 Z* X, b newDirection(@); r! o2 P" l" _8 R7 P
@.HasOrder := true;
/ N% f j5 P- `2 w8 K- X end;
" i2 \1 |. H3 f& I- i end;
1 j" S" e+ z% k3 J9 G% nend; -- of the method: f* B! w9 x6 G
|