/* called by: entrance ctrl of the object 'track'9 u7 s4 N& K7 i2 F2 K9 t3 z9 |
*/* K. d) S9 [9 g9 d
is
/ V) |+ t+ w3 U7 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ n3 v" s1 M2 c" L3 X6 v( T
do, w% @( H. ]+ {' T. b
Lan := rootfolder.Internal.Tools.AOLlanguage;& j1 |' F' K! l
if current = @.Destination -- else return6 ]; }. u* y; {" T3 C5 }- u
then
2 }! w7 O5 X5 {9 C: {4 { @.Destination := void;
' s' }5 _! [) O* b if @.occupied then5 W# K9 h- l, y: R3 j
part := @.cont;2 \& M& y; z$ @$ f, }4 L
@.transpOrder := void;
/ g1 G) V9 I5 j. e: y2 `8 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( F+ R" M. e8 J3 |6 n4 E, L- A5 D# S8 X& v
@,root.eventcontroller.simTime);* r# X: f* k3 E, h: j
@.HasOrder := false;
6 j7 X" _2 p0 i. x7 b( g" I/ T @.DrivingHome := true;
( X. F6 p% ~8 N5 |* G; J. U rgManager.tryToStartTransOrder; V" ]. p; F9 U- v# R3 t& K
if @.Destination = void/ H: [* M c) V+ R0 j
then -- no transport order for vehicle @
/ V& i# z8 D3 ]! b9 o i @.Destination :=
9 p6 E7 ]4 T3 a( D; m! ] rgManager.nearestFreeStation(@,track.~);
9 X, }' P3 ]4 W" W- T2 k newDirection(@); ) y6 [7 i3 w# U1 A# c: t
if @.Destination /= void then- M5 ] z P6 F9 s% y. l
@.Destination.NumReservation :=0 l1 v) F1 n5 R( d. S0 l) e
@.Destination.NumReservation + 1;
2 y+ `. K! x4 p# D end;6 [6 R7 r `5 k q7 T' D9 x$ T
@.CurrIcon := "drivingHome";
4 t5 o3 A8 A: \+ h; E/ J @.DrivingHome := true;1 G% P% V1 ~- v3 k0 A; c
end;# x' h- j( i+ d1 ?1 c. z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 S, {9 p8 I. Q7 l& ~5 w/ ~
part := @.transpOrder;
' W# x2 ?; y1 f4 e1 q; _: R part.move(@);-- load part
7 q# z3 [; b2 N# J z; N @.CurrIcon := "load";
/ Y4 j1 `" Q6 W GlobalDistObj := part.globDestination;5 v, f1 ^6 @* G& d" z1 t& E
assignLObj := rgmanager.rgAssignL;
+ o1 R: E6 _6 N0 h9 u; U) ^- n& _ row := assignLObj.getRowNo(GlobalDistObj);
& ]& g, `" |4 d if Row = -1 then -- since 70# T$ x4 ?4 B$ I6 C
if lan=1 then9 t \ b: i6 M4 ~4 } i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. }2 G/ ?& @% H' m( ^8 z. f' u6 \ to_str("in der Andockstation: \"",?.~.name,"\""));* D7 ~, |* ^3 i$ l
else# A( d+ \% w9 b/ q9 K. n; ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 g, h3 E0 J7 n! R( U" w! A* O m to_str("in docking station: \"",?.~.name,"\""));
2 D4 P# q! [# h# x7 ` end;1 G! k2 l% Z& T8 o) P
else6 P/ g2 f8 ^4 K, S; i, f* J
@.Destination := assignLObj[1,row];
+ s0 j5 | D* R' ^ end; ! S/ p$ ~) C8 e0 \; W; z/ s
newDirection(@);* d* Y/ U) ]/ b: ^- D; \! Z
@.HasOrder := true;
( N/ R( F4 g3 B: D5 p end;' `8 z4 A& f/ _+ s
end;" H3 q: j* I* R0 O3 K/ F8 Q v
end; -- of the method4 h; ?& v0 E" [# a4 V7 N
|