/* called by: entrance ctrl of the object 'track'+ [3 i3 a4 y) }: m: }2 B
*/; ~' e! ^/ [6 }- W
is
" m7 z3 o+ i! S9 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 |: @0 ^" W9 D+ ido J" p( G. D* Y# x8 o& `
Lan := rootfolder.Internal.Tools.AOLlanguage;; Z# d8 x) ^" [4 X
if current = @.Destination -- else return
6 ^% m( F8 i5 L2 V. { then8 m+ D. Z' O* n2 g
@.Destination := void;
2 m9 f! D' [5 z3 S @0 P if @.occupied then: @0 p. N! k' k' d2 t( A
part := @.cont;
9 _, Y7 j$ R2 p' r3 T# i0 \ @.transpOrder := void;
) s3 B, [$ \7 A, L6 t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& ?* p3 c6 K: `4 b6 z) Q, C8 N @,root.eventcontroller.simTime);
5 H( }7 m5 P, `' M& ^ @.HasOrder := false;
2 e9 \2 f. Z, P% V" ?. h @.DrivingHome := true;
+ v+ X( u, h+ W0 t$ o1 g; T rgManager.tryToStartTransOrder;
0 a7 b1 J; X) K! t$ f if @.Destination = void0 _, n4 v: O% x4 s
then -- no transport order for vehicle @; }( ~- Z1 p+ w" Q: B* j5 C
@.Destination :=9 [4 Q7 r% P% ^9 G
rgManager.nearestFreeStation(@,track.~);
% p3 E$ p9 i' e8 s- g newDirection(@);
$ X/ Y6 z( f* h& I) x" N: F. Z& l if @.Destination /= void then
% w1 ?# m& {. |: O! I% U7 N& p. O' B @.Destination.NumReservation :=; E6 [. ?, T; S% I7 g3 T+ l
@.Destination.NumReservation + 1;9 x! Y4 U" ]$ s: d' y# e# c! L
end;' U: R( E: S' P# u* i* S
@.CurrIcon := "drivingHome";0 Q/ V. ~) `& c
@.DrivingHome := true;
+ T! I6 p+ r$ M+ R' w end;- d6 l8 {5 Q- l' S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 k: f. G: H4 _% \ part := @.transpOrder;
. g0 \% Q0 k% W& T X) r* J# { part.move(@);-- load part% z- \, p. q, r6 W; G8 \3 I
@.CurrIcon := "load";
4 s9 o8 B) X4 h! M3 \ GlobalDistObj := part.globDestination;
8 q) o% @/ }* ]/ L assignLObj := rgmanager.rgAssignL;
& }0 k5 S- N: |- J2 H row := assignLObj.getRowNo(GlobalDistObj);
2 }( Y: v2 H$ |6 |4 |/ k) j if Row = -1 then -- since 70
- }1 F/ o8 B9 W* h' S& N; O6 e if lan=1 then/ a q! l# [) r# S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. \2 u# U/ L% F& r to_str("in der Andockstation: \"",?.~.name,"\""));
v! t! E4 Y: _1 q; x else' p7 j, d9 e' b/ F5 ~- t- \2 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. e3 G2 l* f" X7 C( }
to_str("in docking station: \"",?.~.name,"\"")); * ^' z( a( v! f& a
end;6 U& q2 Y- a! a, I! V9 ?: D+ r
else1 H7 c6 q, r( t, c. [
@.Destination := assignLObj[1,row];
4 Q9 E- I- K* H) U8 a end;
( Z( [9 `& S e& {4 M; W newDirection(@);
+ N9 L2 N! w; h* b. K& c @.HasOrder := true;' Y% s# K2 I j/ J/ q4 k+ K0 _
end;; L3 ]( v7 g1 R* h [4 L2 p9 [
end;
+ {* n$ p' G& F) d4 w0 U tend; -- of the method$ l8 m$ ]3 f3 m/ b- h0 {; l1 x
|