/* called by: entrance ctrl of the object 'track'# x# G; |6 y+ h0 p
*// P" t. ?" f# J; A9 i
is+ Q6 s2 ?. G6 P. o6 D/ p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 D; S. L8 L% [" K: C
do/ H$ w. u: l6 g6 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ g! h6 g) x( {1 q9 l if current = @.Destination -- else return
! @% M9 c V) ~# R then, K" Q& H8 m0 {- ]0 ~. U
@.Destination := void;9 p! @0 N9 ~6 h' q8 |( M% f/ ]/ I
if @.occupied then
$ [4 ^% i; c( z& o. N0 C part := @.cont;7 }1 }% o- l1 R1 s" y
@.transpOrder := void;/ t9 T7 s- e: j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# f- c* y4 g7 G U+ `7 |
@,root.eventcontroller.simTime);# J$ H8 a' m1 l6 E8 _- s, x6 h: M
@.HasOrder := false;
4 l; f& e' B+ B B# G @.DrivingHome := true;
* k. q) p# L; Z; @) _" D rgManager.tryToStartTransOrder;% a; b4 q; f) N
if @.Destination = void
! E; D' Z7 s/ v7 H then -- no transport order for vehicle @9 L: [3 Y# r( J4 @2 ]
@.Destination :=
; b4 ?8 I2 R' I/ O3 h& G rgManager.nearestFreeStation(@,track.~);" i/ Y- q( F9 k
newDirection(@); 9 M1 w, Q' R+ N6 S1 A( y9 I
if @.Destination /= void then& E# ` K( c" c: u; g- h
@.Destination.NumReservation :=" }5 ?% ]$ _* e% F* m
@.Destination.NumReservation + 1;& f2 f4 t5 j5 ?5 y
end;$ D, F6 N5 V7 f
@.CurrIcon := "drivingHome";
. K. W/ m, ]- w3 G7 t0 y @.DrivingHome := true;% ^4 r' A5 S/ ?, ^" s) K& K
end;
8 u# D$ i+ P, a6 n* n# g5 R, A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- p/ D0 v0 T9 t3 Z part := @.transpOrder; y- e; S9 `# T' c4 G
part.move(@);-- load part
3 t4 c2 q1 o& F& G/ m2 G& w @.CurrIcon := "load";
/ O" Y8 `. \0 g3 [2 W GlobalDistObj := part.globDestination;
g+ t% e% z6 b6 D' V assignLObj := rgmanager.rgAssignL;, i6 ^$ i9 `- g% w8 J
row := assignLObj.getRowNo(GlobalDistObj);
) A- j! q' C1 d2 u! [! w if Row = -1 then -- since 703 X8 @6 k Y) G: k1 S2 n1 c
if lan=1 then ~ ~* [+ P; [, F5 g7 W; }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% S2 t$ l# f6 W
to_str("in der Andockstation: \"",?.~.name,"\""));
* }. \$ S# ]5 O# n3 g8 I else
# c- O* j) @+ `& q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. g% W/ u1 C% R/ G) K. |
to_str("in docking station: \"",?.~.name,"\"")); 9 w I6 L! l) T: o% R
end;
" M% O# i# j/ m1 m' `- x$ R7 Q else
# o! g" [- t- E @.Destination := assignLObj[1,row];/ p8 \, p. J+ Q
end; 9 a- B/ w; N( M) N% |3 a/ }
newDirection(@);! `8 }$ s/ {! D6 z
@.HasOrder := true;
! m: V) r, H$ `8 q, w end;
' p8 O2 S6 [3 J! G( B; o2 ^+ U end;" ~" h1 l x, Y: F5 x4 B" P# I
end; -- of the method. g4 z' S6 y1 Q4 J- r4 i
|