/* called by: entrance ctrl of the object 'track'
- ~/ G, | [( i" J: w2 b; \*/. S7 h' A( f) X! a: J9 Y
is2 j1 ^4 v5 R- b! P/ a; _/ m# N) \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ~" \6 P, V( e t( c# d$ s2 ^5 `
do
; z4 E; j! ^; f, O0 C Lan := rootfolder.Internal.Tools.AOLlanguage;! f& p' K/ i$ X6 G. L4 r3 r$ S9 @
if current = @.Destination -- else return4 P6 T$ ~: N+ g2 \# y) I8 c8 k
then" |8 V( _& ~) o6 f( x* L0 j
@.Destination := void;1 W# [3 Q6 {/ \1 s2 K
if @.occupied then2 W' u! z* P# u. y* F. f8 B
part := @.cont;
* ~8 W) _' K4 Z5 y: d, p Y @.transpOrder := void;
$ ?2 c! ^# g j" A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ?% H/ j0 n9 @7 f9 Z4 E. f! S
@,root.eventcontroller.simTime);. F- I$ {1 Z2 B( T
@.HasOrder := false;. S( ^; x" M9 J. ]
@.DrivingHome := true;
; ?$ ^% b# }5 b) U9 Q rgManager.tryToStartTransOrder;8 Y" f$ R) `2 _0 R" A8 J0 ?( `
if @.Destination = void
7 v* L3 j6 f; O9 o- \ r6 o+ S! F/ ^ then -- no transport order for vehicle @8 z) ^8 v' l0 q- I4 @" |3 v8 b
@.Destination :=
) |0 B: \2 E- ]! f4 j rgManager.nearestFreeStation(@,track.~);
* K( J* s/ u5 V+ X2 W6 q" s! ? newDirection(@); , i" N ]5 p& N9 [2 @$ v; a! U
if @.Destination /= void then
X' A$ L Y$ E( v) L7 j4 g @.Destination.NumReservation :=
1 z: X' y; o+ O8 X6 Y- @0 ^3 b0 x @.Destination.NumReservation + 1;9 e! m% N7 k. ~8 s- A
end;; i- K6 {6 W: I- X# J3 H
@.CurrIcon := "drivingHome";% F+ L1 ~8 U& ^2 c( }
@.DrivingHome := true;
I4 q$ f6 Z1 q! ?' W# Y( s- z end;
$ V' p& n" D& ?8 p5 a) Q1 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ I2 p2 S7 h r) E: {' X part := @.transpOrder;
1 e+ r* Z7 u0 [ Q9 ]7 c. [ part.move(@);-- load part, F7 q& T) X; D$ F: J$ h. E
@.CurrIcon := "load";$ r+ Q2 F/ M f8 D( P
GlobalDistObj := part.globDestination;
) k. O' V! [, Y6 ^; i8 a assignLObj := rgmanager.rgAssignL;
' y4 X6 `* y5 ~, m row := assignLObj.getRowNo(GlobalDistObj);
2 u9 ]2 T( i+ O* d; H if Row = -1 then -- since 70
" B5 m6 H! V9 M! B' f z if lan=1 then
2 N2 k! q# s" }0 r3 _3 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' V. J% t# e2 H
to_str("in der Andockstation: \"",?.~.name,"\""));2 C1 U; ^! r0 I' S* H) y
else- K% m, g8 u( ~2 k( Q1 v6 W& _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 K5 V+ h4 W0 G2 l+ P9 `: L" {
to_str("in docking station: \"",?.~.name,"\""));
( }3 g$ ]: }. z( T Y8 Q end;5 g7 J5 e: q) _' y6 t- S9 L
else$ y$ f* [1 b9 @# Z
@.Destination := assignLObj[1,row];6 V* p9 p, ]- h% g d: T/ I
end; 9 [/ O$ J }- N8 b+ b- w
newDirection(@);
9 E7 |0 b3 F- s @.HasOrder := true;0 o) Q4 I! `( B; U* x
end;
9 Q6 J6 o$ k/ @* ? end;/ F- I# c/ j m5 p$ u% Y s+ ?' c
end; -- of the method
/ i, Q. j8 [3 s% M- j0 o |