/* called by: entrance ctrl of the object 'track'$ r5 z9 q# E! }, A5 ?' B
*/) B) W' d8 k, O5 G/ f
is, }7 z/ b0 J" p/ E1 s% {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 M) [ t# d% i- H
do3 C0 }4 _+ _: Z* Q, C" f
Lan := rootfolder.Internal.Tools.AOLlanguage;) ~3 ~) y# l$ G* J! a
if current = @.Destination -- else return: h; h; ~8 O9 N6 H0 k; j+ _. n
then
7 z& X" l* Z5 s3 Y5 [, A, x$ w: d4 h @.Destination := void;
% _' H& z4 p/ {/ D: I# _ if @.occupied then
( H D7 e, ?) D; W' J! w/ m6 O" v9 @ part := @.cont;8 q/ y9 c: M3 k# n8 _2 d/ {
@.transpOrder := void;1 n: z3 I8 N4 t9 `1 \$ o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, V* L8 P2 f8 x8 }: j @,root.eventcontroller.simTime);
4 w& e; V: [; \: \4 a( u* Q# r @.HasOrder := false;
: @" j0 P) j4 ]. b- F% s: O, F$ B H @.DrivingHome := true;
* Y. e% c# Z8 @. e s rgManager.tryToStartTransOrder;; A7 R- K: t: o. ~/ l
if @.Destination = void
0 y7 K: [+ S- J3 {' g6 M2 a* z+ Y. { then -- no transport order for vehicle @
4 T) i$ r5 X9 R2 ?/ P- z @.Destination :=
+ L l0 ?+ e0 B/ J2 R9 G' n rgManager.nearestFreeStation(@,track.~);
+ z$ d; }' m3 ]. E( x# v/ J newDirection(@); ' }# @' y# Z8 [% v
if @.Destination /= void then
7 Z( h! A" {" v: ^% J1 e @.Destination.NumReservation :=1 V# ?$ f/ f4 y/ E
@.Destination.NumReservation + 1;
- k/ S' }" j5 I end;6 H+ T& [$ ], u7 R0 B) V
@.CurrIcon := "drivingHome";6 q v# m- L$ J" k9 X% [
@.DrivingHome := true;
& |6 o, L4 h4 P9 R" y1 m4 z4 ? end;- E+ E# Z* O& r' i/ }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 D4 q6 f' G! B; Z part := @.transpOrder;
. c3 z, y0 F$ `" J, ~1 }0 Q+ S2 j part.move(@);-- load part
: D6 v% g5 R1 N0 [4 ^ @.CurrIcon := "load";
: |* p6 n! u" W GlobalDistObj := part.globDestination;0 p2 Q+ o- T* }7 v' |: g
assignLObj := rgmanager.rgAssignL;$ u8 I1 {: f8 d* w! u8 z5 D5 @
row := assignLObj.getRowNo(GlobalDistObj);- I% T! l. f6 y- w }& k/ Q8 z6 ?. F
if Row = -1 then -- since 70 a ~5 m9 H& `0 h
if lan=1 then
+ }+ w: \0 q# A9 b/ V" k( W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: |5 z5 d- x2 V) Z) h) u6 ~
to_str("in der Andockstation: \"",?.~.name,"\""));
( A: B# U# O6 o' G5 S else
% M$ i9 z3 j( k! J, a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 J: D% W- ?6 i0 G
to_str("in docking station: \"",?.~.name,"\"")); 7 `" Q* W+ S" x: m
end;3 D2 T# z2 @/ w
else
3 q% g# O$ r+ c) l9 g, @ @.Destination := assignLObj[1,row];
( z% H% W* z' a$ w, Q3 c; v end; % P {- I* ]2 E6 p+ v4 o* q8 C
newDirection(@);: x/ U4 Z7 x) ^3 E G2 \" X0 Q( g
@.HasOrder := true;
+ J$ i2 u' M2 R5 e& r end;
9 r. h% G# A! a A" g end;
8 Y5 z4 a+ s/ K1 K; Z2 g) [. Mend; -- of the method
: p* G) @3 F+ G: C, Y7 h |