/* called by: entrance ctrl of the object 'track'
4 {6 l3 u+ T, b( Q" F* n6 l*/
+ U+ P& M; \. {, ~is
# f, p3 E/ q- j, \7 H4 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;: `6 z5 M$ m8 A' }# j1 l
do/ Y$ a/ D% K) r+ n/ m6 O
Lan := rootfolder.Internal.Tools.AOLlanguage;
! i: w' O# \9 _7 o5 z1 ` if current = @.Destination -- else return
. [* j- b# X* g. J# H then# h$ X* ?7 Y) |0 K5 Z+ d' O
@.Destination := void;$ D6 P2 O" L5 B9 F1 W
if @.occupied then
" O# @$ _/ X$ d6 p part := @.cont;
4 `% t4 V5 p: z+ p9 b; C' a! I' r @.transpOrder := void;
! p, s- @5 w: |. x5 M1 w+ l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ~% |6 t1 z) a) B @,root.eventcontroller.simTime);
9 N2 K& z- g. t! @3 q5 P @.HasOrder := false;9 e2 Z. ^3 b: n% f2 N' j9 ?
@.DrivingHome := true;
3 `2 }% m6 i, `% }# V rgManager.tryToStartTransOrder;
9 W% W: J" o! C) N0 q; y5 c if @.Destination = void
! u5 b' o, e& {& { then -- no transport order for vehicle @
3 @1 s0 V/ @& W# a @.Destination :=
& x5 }! M: p4 Y rgManager.nearestFreeStation(@,track.~);
+ t' B# r# V$ H u; e5 f newDirection(@);
: H6 e+ ~, h. S9 B- F) o$ _ if @.Destination /= void then) J0 i, _. I P
@.Destination.NumReservation :=
: ^) L& X2 f, a" y+ R8 ~( v- ?) { @.Destination.NumReservation + 1;
O& E& T2 W. b: J& r end;* L9 q+ I. \/ s( ~
@.CurrIcon := "drivingHome";
( Q7 s$ J4 O1 S& A8 |* p3 g9 c @.DrivingHome := true;
) L3 J6 N) j7 M) J# Q* m1 i4 |; R end;
( O; m; l6 ]1 N2 G! v% S4 c. A- [! ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" i4 ^( z* D. J' @! ]# h* z part := @.transpOrder;! ^: m3 ~' R( Z: K" ]) T
part.move(@);-- load part
6 @( u; Z& }* `: t$ \; N @.CurrIcon := "load";1 ?4 M ^/ p1 V8 }( [" p- M
GlobalDistObj := part.globDestination;
7 P: L9 {, C# e, e5 I assignLObj := rgmanager.rgAssignL;* V3 X2 q& l1 v) M
row := assignLObj.getRowNo(GlobalDistObj);
7 U% h4 H" L( ~( W* y if Row = -1 then -- since 70' ^: b5 k3 A9 |0 t
if lan=1 then; g( G5 T5 y% T2 W4 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* k, X( n# G' E- W+ W0 E+ ?
to_str("in der Andockstation: \"",?.~.name,"\""));% ?- s' h# Z& e } o
else
2 Y/ L, X$ ?4 e k' v6 o3 o" w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ |$ T& k# g3 O1 k1 ^" s to_str("in docking station: \"",?.~.name,"\""));
; d5 i. a! a6 T9 y- y4 K$ F& ~ end;# ]( P" i9 x7 @: C3 `5 B
else
1 ~+ G% l @8 F @.Destination := assignLObj[1,row];
. \( w+ k+ y, Y, P end;
7 L* M& I0 v& [" y( m! Y7 s newDirection(@);
4 p7 s- N: n- U% u! R) m+ P! N; M @.HasOrder := true;" ]4 b, x- T/ t
end;
F9 @) Y5 t, _5 N$ G end;
1 x9 ^7 b/ |. e4 T8 D# F/ I: |end; -- of the method
) s, b: i* x3 B |