/* called by: entrance ctrl of the object 'track'
4 j5 X, W& i( Y*/5 C8 _6 T7 c% j, _; Q! X! ^
is
0 }" h( l/ ~4 Y( T0 k7 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;% H) X3 e4 a6 J/ L* y6 ^+ ^) n
do
7 H' Q/ b' ^" ]4 `9 ` Lan := rootfolder.Internal.Tools.AOLlanguage;
5 n0 Z$ G( [ u6 h% N: E if current = @.Destination -- else return2 C$ {% V3 a2 L6 g" }; R: g6 M
then
( }2 m; C, h, l8 G/ ^ @.Destination := void;+ r1 z* h3 I c2 [. X6 `( G
if @.occupied then3 M2 A6 C6 T/ q, c
part := @.cont;
8 [* n) B( C c% n @.transpOrder := void;
6 j1 T6 k; `" S+ z7 n+ B: O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 M& U( o' p0 H R7 J, Q- O9 @ @,root.eventcontroller.simTime);
8 c4 x. ^% S* E, j$ C @.HasOrder := false;3 J M$ t# @. ~$ c2 X' j3 T3 x
@.DrivingHome := true;" Y2 M9 g+ p o* H
rgManager.tryToStartTransOrder;# h5 g, @8 N4 k0 Z6 q) I. o$ |
if @.Destination = void0 l5 U3 g+ S' J- b0 D6 g
then -- no transport order for vehicle @! ~4 Q4 e* G# b9 U6 Q9 i) V" S
@.Destination :=
) J+ \3 d( `2 u8 v6 N8 e6 r rgManager.nearestFreeStation(@,track.~);
k8 Y. f1 u- p" u3 ]8 K9 a newDirection(@); ( n2 |! J& J* w+ ~! V! }( T) x! _
if @.Destination /= void then
" Z6 x T" x4 T5 {$ `, q D @.Destination.NumReservation :=" d+ b8 v* {0 y$ x; n6 d
@.Destination.NumReservation + 1; ~2 n! Y% O1 ]/ b) v$ s+ D8 u
end;
3 [# @; Q; r) i6 q+ q8 V @.CurrIcon := "drivingHome";# ~( Q5 C$ i; r. j" R/ } R) Z
@.DrivingHome := true;
; s5 W9 X: k: @5 J end;( n( L1 A7 P' n' {# h+ T0 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( }6 J1 N5 k) P8 r9 X$ r part := @.transpOrder;, F/ `9 U0 m& v7 x* W
part.move(@);-- load part
. a- R7 i) P0 ^. b. \; p5 f, y @.CurrIcon := "load";' F a% k, I# D7 I0 O }
GlobalDistObj := part.globDestination;8 q7 k: X/ z# `, p/ |" {) ~* t
assignLObj := rgmanager.rgAssignL;
: P- ^9 p$ r& i0 {4 G: H. E row := assignLObj.getRowNo(GlobalDistObj);
" k1 t: I+ d" c9 n4 X if Row = -1 then -- since 701 X4 ]% W# ]' r6 ~( p$ T- a) B0 M) @" h
if lan=1 then3 y$ \6 c8 t) Z7 V r! Y" s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; C7 ~5 m- Q' y+ v% X& o to_str("in der Andockstation: \"",?.~.name,"\""));8 H6 b. w+ p8 i% B( H
else
) D1 K5 s5 }) i b/ L! k! B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! H5 n* k. m4 @: K! D8 U
to_str("in docking station: \"",?.~.name,"\"")); 5 A+ w: x4 s. |
end;
( t& \# K" d' X- ^! b+ z5 v2 F else
9 d2 P3 t( x& d @.Destination := assignLObj[1,row];% J4 n" X2 s5 ~* ~+ p
end; " r* Z9 p- B. h. I0 R3 R
newDirection(@);
# ]# N' J4 E, N+ w @.HasOrder := true;
5 t0 y7 H t; D. } end;
$ r: ~7 m0 \) `6 G# I n7 s- H! d end;
& J9 s6 y# p% aend; -- of the method# q; t" D! o3 I; n
|