/* called by: entrance ctrl of the object 'track'% j! c* X( N, q! _9 u; h% k
*/( m) Y6 F' j) z D: A3 `' q
is
9 F! ]3 y, `4 H0 R) b$ O part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ l! o6 w1 M9 r x. E q
do8 @& Y* C- H1 Y" Q7 s
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 @2 X% F8 x# ~" P if current = @.Destination -- else return
# q. n! @! d& F& N$ I then& o H9 P l) a% o9 l/ f
@.Destination := void;0 q3 R- x3 r6 e6 T5 o- G* a! u6 Q
if @.occupied then$ D- M* ]! z) u2 Q
part := @.cont;
) Q+ M( m @9 k5 \; G @.transpOrder := void;6 e) X6 g4 x$ _4 T( z& s. X7 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' Z3 \' h* v, A0 t' s; R
@,root.eventcontroller.simTime);
' N% f/ `" w" W1 T @.HasOrder := false;& S" U. Q9 t/ h- ~# ~0 w9 Z
@.DrivingHome := true;% m% D8 S( a) P0 Y8 \
rgManager.tryToStartTransOrder;
6 U& g) A3 `6 l+ k' Z if @.Destination = void' _& i! ~5 E9 @
then -- no transport order for vehicle @; W: C( Q7 M2 b: c' ]3 C% h
@.Destination :=
& x) Z0 N# B/ B# i& A3 j& J; ^ rgManager.nearestFreeStation(@,track.~);
# G* r! ~$ D. N+ r! H8 N- z newDirection(@); p7 X( `6 x5 I5 p z+ _
if @.Destination /= void then* c. s1 h5 z6 @; [
@.Destination.NumReservation :=( D9 ~/ B0 M5 m0 ^3 X
@.Destination.NumReservation + 1;# o: Z: k% a& M# D
end;
0 v$ t) J( f, O$ h8 X7 R: u @.CurrIcon := "drivingHome";
; I. T6 s7 _$ K" h8 P% Z/ t, G/ L @.DrivingHome := true;' q$ H) n A/ B/ W5 ?, }% I5 V
end;9 E. k, {& m6 L7 B3 k/ ~ a3 X, s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 R' ?- P+ y* ^8 j$ e, Y) s: \: K part := @.transpOrder;
6 E. O2 S" N" w part.move(@);-- load part
/ |: m, `- {( U5 k3 h0 @' p @.CurrIcon := "load";6 k: [# E; E: ?( Y( @1 J7 p
GlobalDistObj := part.globDestination;
/ ^8 h1 R' A5 q1 c& \ f* g assignLObj := rgmanager.rgAssignL;
3 a. H$ S) L/ i row := assignLObj.getRowNo(GlobalDistObj);
7 H9 h$ z0 I+ G4 d3 c! }; X if Row = -1 then -- since 70! m" E* w) J# N/ [+ b) c) ]
if lan=1 then
" }' x3 A- _8 A( i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 U0 [# i1 i- D8 M# m: t' o G5 Q- _
to_str("in der Andockstation: \"",?.~.name,"\""));: ]% J5 ]: U3 m4 _8 [
else
' F) {) n# ~# M5 v" N( i: ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, ~+ |* Q1 F" D \
to_str("in docking station: \"",?.~.name,"\""));
; i( ?% p y- z) e8 I end;
8 l8 g, e6 z$ E, { i" R4 a" Z+ d else
, O2 h2 B* |5 @% t8 j( R @.Destination := assignLObj[1,row];
( x! t' Z5 l$ i end;
4 i ]$ L+ p9 d6 `& J( ], o newDirection(@);% y# q. D6 e, h5 H }& l
@.HasOrder := true;7 h; n$ @$ q7 Q0 a) Y. d( @* u5 @
end;) Y, c) k/ E, w* F/ m& Z
end;# ?0 V+ t) l. ^
end; -- of the method
$ R/ x6 l; X7 H$ h, p& X |