/* called by: entrance ctrl of the object 'track'" c! p5 _1 i; S/ ?* v6 R
*/
# N2 I. Y/ P! P+ n9 Cis
: N+ W J- u6 O: z part, GlobalDistObj, assignLObj:object;row,Lan:integer;& E: T9 { l: n6 ?' W2 P+ \
do
$ g# m: w. K& ~; Y5 V" D Lan := rootfolder.Internal.Tools.AOLlanguage;: f3 q5 C# n& \
if current = @.Destination -- else return
$ Z5 U: a* w! N' [! m then% O7 w5 C% z* `
@.Destination := void;7 q, ^" B% Q* J& Y6 o
if @.occupied then2 V- a" m e y \- }
part := @.cont;
$ w7 V: `/ b% X7 \4 d/ }1 D @.transpOrder := void;
; t0 B! S# y' ]; k# f. M! u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 C9 d) T: M ]9 h @,root.eventcontroller.simTime);
, C9 `1 a- [/ |0 [1 }2 Z+ t @.HasOrder := false;# \: @% Z( g% \( x& w7 ~. e
@.DrivingHome := true;5 w1 L) k* i5 j) A" S* Q
rgManager.tryToStartTransOrder;/ o9 r+ |; |) g' L1 `+ G2 R$ y, J( j
if @.Destination = void
( J' T- \7 e$ ]( c# j then -- no transport order for vehicle @) a/ k- v% t1 \0 R4 l
@.Destination :=
* M6 W/ r0 R1 B4 h9 H0 I$ z rgManager.nearestFreeStation(@,track.~);' ? X0 o0 Y3 |4 x& t& S
newDirection(@); 0 I2 M0 u% p' }' N1 K
if @.Destination /= void then F9 ?& _+ W2 q+ s, f
@.Destination.NumReservation :=. u6 G6 R! w, [9 Z
@.Destination.NumReservation + 1;
- x: u! U" Z L% h$ y# V/ G' R end;8 Q3 _ J+ q/ d
@.CurrIcon := "drivingHome";: F) |6 x3 L* U7 E
@.DrivingHome := true;
7 m0 V5 ]& v) A- K! e o) g4 m end;. A$ p6 A; V+ @" \& q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 |" a, y: ^# d) i e' W8 u( ~ part := @.transpOrder;
$ r3 T H9 |% L% c3 H. L part.move(@);-- load part, ~; F& Q8 `- t1 |0 b5 n2 R! P6 N
@.CurrIcon := "load";! O3 t2 s2 z& f) q8 x
GlobalDistObj := part.globDestination;
+ \1 _4 b3 n! ? assignLObj := rgmanager.rgAssignL;
( t- x5 k' W$ j; D, g row := assignLObj.getRowNo(GlobalDistObj);1 D' A: O$ d7 H# T
if Row = -1 then -- since 70
: M! [& |) M2 Q& S2 @" L if lan=1 then
5 E& `7 _5 X; R' E# K9 Z: K. q0 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 F. O' V `5 y& s0 N to_str("in der Andockstation: \"",?.~.name,"\""));% ^9 }' y& W* B2 ` L9 ~
else
. u8 w! [: ]4 q4 H/ \" R9 k2 N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 C5 V' `( ?! o# e) f! W
to_str("in docking station: \"",?.~.name,"\""));
; W& V3 b" T2 B" K end;
+ ]6 F& ~5 X5 t$ H2 ?2 g2 n. G" j else
+ L3 b7 ~" K; i, \8 ^ @.Destination := assignLObj[1,row];
7 l, b- _6 c+ J end; 7 g: z6 {2 i/ e
newDirection(@);5 r U2 f; L0 @4 o( ?' C% O9 @
@.HasOrder := true;$ v! o& L- v8 D( d+ h% ]
end;
* A0 n* G. u) U# `. B& \; }# a end;
) n# S. P( E' C3 ?end; -- of the method
* C: x4 N) ?' I8 Z/ N" L3 _ |