/* called by: entrance ctrl of the object 'track'9 m4 k) R) r5 F. ^+ L4 K
*/
) V+ O; Q# b# H0 O) @# p4 _is! i. C# [9 G& Y- M* ^9 D% X3 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 N( F' G0 p) Edo
+ m* U. b/ z- }. B; E4 V Lan := rootfolder.Internal.Tools.AOLlanguage;) m0 {9 S( c: b h* d
if current = @.Destination -- else return* ~" K& Q1 f9 _ }4 H- ?
then @# J- ~! {+ t" E2 [& m* X
@.Destination := void;+ t. ?9 t! g: K
if @.occupied then
0 W! ]7 i, Q: @ part := @.cont;
e+ I+ V* A/ S L @.transpOrder := void;1 y0 O. B; z% _0 G& L! b" d% ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) R; m! ?8 n5 x4 }
@,root.eventcontroller.simTime);
1 i# D% l7 ` R; e+ m @.HasOrder := false;$ f2 M/ O* o. k; y. B/ d
@.DrivingHome := true;/ N, l$ v' Z. n2 r% _/ L/ @
rgManager.tryToStartTransOrder;
9 S" H* s" Z( J* i { if @.Destination = void% s; @0 j( H9 {' ^
then -- no transport order for vehicle @
0 V+ r5 C5 w% ?6 `- V1 K @.Destination :=
3 I) ?8 i& f8 ? rgManager.nearestFreeStation(@,track.~);& x; V- o, }; v
newDirection(@);
) Y$ ]- s) h1 G if @.Destination /= void then
% k2 [: [8 ? T% f @.Destination.NumReservation :=9 I/ c' s; R+ p4 B
@.Destination.NumReservation + 1;. o$ p( B2 I1 g" S2 w: V6 m
end;
3 {# j6 [: q# c8 c @.CurrIcon := "drivingHome";8 g) B+ n* e0 C# A% L, u8 l
@.DrivingHome := true;) S* s6 D0 N, U
end;- N8 u+ C7 S3 C0 s2 x Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 D( I0 d; e9 f+ R part := @.transpOrder;
# q0 U- [ p, j5 J, U part.move(@);-- load part p3 C5 [4 O: ?+ W3 k6 }6 A$ J
@.CurrIcon := "load";
# G# M% c% \! R2 _1 X" \ GlobalDistObj := part.globDestination;/ q* W; M# D8 J. a+ T# n
assignLObj := rgmanager.rgAssignL;) @- [: h" l/ n! f' c# X
row := assignLObj.getRowNo(GlobalDistObj);6 o* q3 S0 o: m" D0 F1 R
if Row = -1 then -- since 70
( W7 u' }5 `/ B! M1 \& H# I if lan=1 then
. [! v0 p9 V! c$ f- ~$ N4 @! A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 J) } W$ Z! p& @; J% J* e2 u to_str("in der Andockstation: \"",?.~.name,"\""));
; d6 v8 I; j9 e' {: w, \. D3 h N/ E else! i3 q( f! Z8 X/ I; O8 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 @, O( p0 S. }( j. ?! A2 | to_str("in docking station: \"",?.~.name,"\""));
4 l2 b6 q6 i) i3 F! ]) u end;, f4 X# A) ^/ \* k, V3 r. B9 L8 Q2 D: p
else( S" l; p9 a+ M# b1 W5 f& w2 X3 v1 t
@.Destination := assignLObj[1,row];
0 D% s" L# I! P* L end; 1 Q8 U2 @7 m1 ?7 |- k1 s
newDirection(@);; x1 y0 i" \* O, [) y4 B
@.HasOrder := true; S; p2 Y7 Y/ S+ G+ b2 c
end;/ N& ]4 K: F5 t3 h6 `
end;* d( J+ ?1 y& J
end; -- of the method
% [7 y$ |5 A2 t9 q1 U |