/* called by: entrance ctrl of the object 'track'
/ r8 s5 H) E [$ d*/" O# W: S, a0 @: i
is) u4 f$ K) p' O& g" F1 y* I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 A9 ]8 V* i& s1 j. B: qdo0 F/ \& H" [6 s
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 b+ a* v: ^- [4 f$ I9 Z/ Y if current = @.Destination -- else return9 }# d% s6 E6 l$ m
then& U, ?' N5 F' E3 [
@.Destination := void;0 K, V: @- H/ J0 T$ z( Q, G( ?# q
if @.occupied then" z0 v1 ?, j( _ T5 x4 |
part := @.cont;8 a: o# t7 Q0 ]$ _7 Q- G, {
@.transpOrder := void;
7 R$ d- C$ A/ V2 W3 F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% [# Z; d& N% _( Z) k
@,root.eventcontroller.simTime);
9 U; E. x0 I6 W. a @.HasOrder := false;
. j9 w; [4 `+ W) |3 [6 _7 a& {# x3 m$ ] @.DrivingHome := true;
( L# l, \ X U8 V, f rgManager.tryToStartTransOrder;
% Z( ~$ a U5 Y" B$ V9 P if @.Destination = void9 } n, ]2 e4 E% f
then -- no transport order for vehicle @7 M) W0 N: H7 e9 x, R! w( p- q
@.Destination :=
( i; S, T# C% M& n) n! P* L rgManager.nearestFreeStation(@,track.~);. U2 K$ i+ t6 y" \& P9 d/ [' f
newDirection(@); # Q3 T7 N* Y1 W/ V2 s
if @.Destination /= void then
3 p3 b# [1 `, e0 N3 d: F @.Destination.NumReservation :=
& t" j+ Z# g3 ?% a @.Destination.NumReservation + 1;
, |! c/ d7 t' e2 q B* w end;9 k% S' E2 w8 Q8 V# F. {" g1 Y
@.CurrIcon := "drivingHome";
3 y& z; w$ t) K6 p/ l- W @.DrivingHome := true;
7 |7 x! m, ]8 P; J8 p* N/ O end;4 ?5 E1 r( O" Y+ T: ?, B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 Q4 J6 D0 i4 a" ~6 F0 x part := @.transpOrder;
+ j8 q x9 Y" D2 ~4 x4 F% \+ s* L& | part.move(@);-- load part' E. c( h. G0 ? c: g' A
@.CurrIcon := "load";5 l F1 d" g! ?3 W) v2 [
GlobalDistObj := part.globDestination;
k% l7 w1 R5 z assignLObj := rgmanager.rgAssignL;
' @9 O% Y% _: t6 E# V% q# N+ y1 f row := assignLObj.getRowNo(GlobalDistObj);( r. a2 U8 C6 _* K: ~! x$ @: e# M- c
if Row = -1 then -- since 70. ~* R% W& ?+ N4 i0 `
if lan=1 then
8 k) C. `. F+ W r1 U: a0 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," h* F B5 D1 o# H
to_str("in der Andockstation: \"",?.~.name,"\""));
" o2 Q5 A9 I6 G! A8 ^: G+ @1 v; y else
c$ d1 i) j- l" v; s8 a( ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% I/ b* Q8 s0 o; L' N3 t* M$ Q to_str("in docking station: \"",?.~.name,"\""));
+ {8 C$ J- W2 s( e0 y( {4 }2 X6 n end;
% Z8 ^9 D0 e* Y0 q* Z2 L6 e else
; J$ F/ @' i6 r* F0 F: n7 B& R @.Destination := assignLObj[1,row];
, q o: ]3 K; e+ A# s% x end; 7 p' \! X5 ^! N0 \3 M7 L5 t
newDirection(@);
6 e0 I& n. [8 P6 c2 P @.HasOrder := true;& p" j$ y! q6 Q& f
end;+ y% [1 y3 Q. _0 u/ B
end;& d7 ~' j9 q0 q; |
end; -- of the method- ~8 u' [; o4 D( a: U- E
|