/* called by: entrance ctrl of the object 'track'
2 R- A1 U- [/ C: h3 p0 B i*/& q8 V6 k( R$ m3 _1 O: D" ^) ]% n
is
& ]% H6 h* Y* ]! f2 W: w J. b part, GlobalDistObj, assignLObj:object;row,Lan:integer;: a% s+ }$ ], m' f v$ f( l
do8 Y6 _8 P2 y4 f: ~" q8 L; i9 V
Lan := rootfolder.Internal.Tools.AOLlanguage;" J8 Q% W0 {$ s
if current = @.Destination -- else return
/ k0 c- n4 l! q' X/ v* C% u8 B! `! \ then
7 `$ ~: ?* F% a, y$ g/ |% L: U2 r @.Destination := void;. d( V. P" p* D9 h
if @.occupied then
3 U# y, O, ~, X& M: x; G part := @.cont;8 H( ]' B( W7 F1 z2 P/ S/ `+ F# k
@.transpOrder := void;
7 i1 R8 d4 A* r, | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. B* R, y/ U8 ~5 F' T( c$ ] @,root.eventcontroller.simTime);; H/ D# x5 D" ^
@.HasOrder := false;7 ]1 ^" U5 V, t: x
@.DrivingHome := true;4 {8 S, M6 r" G
rgManager.tryToStartTransOrder;
% A6 e j5 h9 l9 T( h$ Y8 V if @.Destination = void9 i; V y3 b. \; ~5 ]4 ]
then -- no transport order for vehicle @
: v) v* N6 O( p% J v* h, Y, [ @.Destination :=" V8 N( n. S# }
rgManager.nearestFreeStation(@,track.~);
; X4 W" N7 S' F: Q/ T newDirection(@); # x6 T% v/ v& E; b
if @.Destination /= void then
' r) C- z/ f) |; _# v3 | @.Destination.NumReservation :=
) H) k- w7 U! `6 G* H) ^6 x! o, x @.Destination.NumReservation + 1;
$ c8 }+ h' C9 [8 u! L- a& H end;' u$ r. l# \! q& |
@.CurrIcon := "drivingHome";2 ?) d" X. H2 N. [: C e
@.DrivingHome := true;1 S1 I+ @ Y6 N. s7 D! W% h& ]1 M
end;
/ Q# D! p* E ?7 O& N/ H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 c' X% ?8 R. S part := @.transpOrder;
, `: k$ ~, _$ f/ V, R A# u part.move(@);-- load part" P5 p6 a% ?5 X' T4 W7 n
@.CurrIcon := "load";4 Q7 u' d% O* w- P7 n% q5 }; ]7 ^3 H+ Z
GlobalDistObj := part.globDestination;8 s6 e! l) Q9 I
assignLObj := rgmanager.rgAssignL;
6 v; e5 U/ L/ F+ ^ s% R row := assignLObj.getRowNo(GlobalDistObj);( n% M$ ^2 ]. n* ^ e8 q
if Row = -1 then -- since 70
2 f/ i7 p; I2 \: _ [4 z if lan=1 then
1 |3 h( @) s+ g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 d n1 C$ Z# t. M" D. I to_str("in der Andockstation: \"",?.~.name,"\""));
& |/ }& X( G$ q9 _. m9 W/ B else
& ~0 ~ ]9 f/ C) n6 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: H( j! a6 E% Z/ o to_str("in docking station: \"",?.~.name,"\"")); 9 _0 \, w; C5 a3 u
end;
6 g) n: ~6 ]. S+ \7 ^( h5 J else0 I# V% u; m1 V: x( q8 I. D
@.Destination := assignLObj[1,row];" u, _5 J* t3 V! ?6 H
end;
& ]8 _" j$ `# a, { newDirection(@);
$ @! W$ D: _: |& e! `/ w @.HasOrder := true;% s' l2 W# d' S; U
end;7 z& f# u; z1 L( d! B
end;( e) }6 _9 K6 e# [0 c+ Q' ]0 g
end; -- of the method: t) x) B' O; p: P
|