/* called by: entrance ctrl of the object 'track'3 Z% \* V" S+ V! v
*/
8 N6 v6 Q8 Q r6 V7 Bis
7 V7 ~' m0 Q8 |0 i" r; N part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 v& J6 }( @. j' Z S
do
8 P# T1 ?' s0 w! ^% ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
' p `5 D5 B) f; T; V if current = @.Destination -- else return
8 J2 k; Z o I, V: |2 } then+ m9 O. M! d o' q: l
@.Destination := void;
- R- h. H1 l/ k' R if @.occupied then
9 |. L2 Z- ]; z& Y8 g3 T part := @.cont;" i( y4 ]4 y; |* G8 u
@.transpOrder := void;2 N1 W7 ]1 ?$ ^' ]+ l9 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* z" b' x0 G* @ k2 o) J! C @,root.eventcontroller.simTime);6 f" u" e9 Q6 R3 `
@.HasOrder := false;' K. |1 E3 _6 \
@.DrivingHome := true;
0 ^% t1 g. l# ?- E! B rgManager.tryToStartTransOrder;
0 L( L0 r; Q8 S% a8 v& x if @.Destination = void$ q S% [8 d# c+ h+ e
then -- no transport order for vehicle @
) u" b" q; l/ w+ x2 X& C @.Destination :=# `3 |! @! W/ O" M+ d
rgManager.nearestFreeStation(@,track.~);
" R7 }$ }9 w' H, }" i newDirection(@); - W" \3 h$ u; ~/ W' \6 }
if @.Destination /= void then
% r6 e9 o3 c: ?2 w7 } @.Destination.NumReservation :=
% h- _( i& t1 W- k$ E h+ D' G4 }+ z* P @.Destination.NumReservation + 1;! @7 H6 i7 R" J5 g. g
end;
4 j0 [: g/ R1 L; Q+ y4 Q @.CurrIcon := "drivingHome";' g f. ^5 A( B8 @) T
@.DrivingHome := true;' S' Z/ a* Z& H6 v) V
end;
N! {8 h. Z/ q* W8 L$ {. w- S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' k4 `$ m: I- z. U part := @.transpOrder;& t6 W+ L# T" ?
part.move(@);-- load part
, R- D) @9 ?" n+ u @.CurrIcon := "load";4 M1 B" p+ u" x! i' o$ Y
GlobalDistObj := part.globDestination;, X4 F; g2 u# z$ g: R9 V
assignLObj := rgmanager.rgAssignL;
5 h U/ q8 Z0 A3 y; m \ row := assignLObj.getRowNo(GlobalDistObj);
# ~5 L2 a+ V7 A. A% f6 k; U# C8 | if Row = -1 then -- since 70; ^" q+ D, v7 R7 i" E x t4 ~
if lan=1 then
& ?& m _6 _9 V* L. x8 I7 m, s% ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' y4 F: m: C# `+ S( B( y" R
to_str("in der Andockstation: \"",?.~.name,"\""));
0 U% y: R4 r7 |7 Z& M k8 R else
& p5 Y7 ^( ~; S* ^8 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 n4 s6 d+ D$ t9 ~+ c7 b& e4 G4 y to_str("in docking station: \"",?.~.name,"\""));
0 S2 |! H' c1 @7 z/ Y4 c end;0 a% h3 D! \- c j% V9 O; t0 Y
else1 a8 V! I( G' |5 D
@.Destination := assignLObj[1,row];
$ }2 w1 c1 P0 d. W. J2 l end; ' R) h' I" t T. m, o$ o
newDirection(@);
5 d+ I. \; ~: _: p+ ]9 C+ [8 f, x @.HasOrder := true;9 { v8 e* h; r& X( J
end;
/ w# Y4 n. o; y: | end;
' M* z( _! U2 ^end; -- of the method
; l/ m5 ^8 c0 \8 B7 W |