/* called by: entrance ctrl of the object 'track'! t3 R( u) R4 {; ?
*/
* B4 P/ h* }: Gis4 {0 i6 j4 a& {4 g: h" _% v( [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- g4 N& \* R4 g. P; W$ R
do+ a5 K! g: f% m* T$ }; ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 { d7 G; z5 j& E# @) ` if current = @.Destination -- else return% n( u. R0 f7 q' `% S0 @
then
- _' [$ O1 [% i" M h0 ~ @.Destination := void;6 U' P. c" c0 \/ i9 y& o
if @.occupied then
0 e+ Q5 E2 \! D ?$ g5 n' N( o part := @.cont;" d: }9 o6 R: n2 a) Y' V
@.transpOrder := void;
( G7 U' c3 i' `* _. Z' O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 s* {1 _: }% L! C
@,root.eventcontroller.simTime);4 v5 x# ?" M1 X0 y
@.HasOrder := false;
7 z4 R% \ Q G# ?- K @.DrivingHome := true;
. W9 V& ]# V$ z! z2 ~ rgManager.tryToStartTransOrder;
& T% ~1 p' X9 S3 M; v, V, y2 Y if @.Destination = void
3 V1 z/ e4 [7 s2 J0 c! K then -- no transport order for vehicle @5 N2 o; o$ b3 h$ E
@.Destination :=9 p! v$ v& d! M
rgManager.nearestFreeStation(@,track.~);: M2 U0 U% c' m" y$ }0 W% i
newDirection(@);
) k/ b# y, d! K+ e B3 D a if @.Destination /= void then: J) i) @ i. I$ e' `
@.Destination.NumReservation :=) n7 ?1 B+ Q% O5 `# u' X! j
@.Destination.NumReservation + 1;
* `% p7 f1 X0 Y0 N! t9 p end;- A# `6 y1 O; s0 l
@.CurrIcon := "drivingHome";
' U2 |# W. \) Y! D' ` @.DrivingHome := true;- W/ L- A# r$ A/ z
end;$ \/ E1 s0 a) p* D& ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. X1 P1 f" L+ X! L& I! M0 D part := @.transpOrder;/ ?# M+ \2 q, f0 G
part.move(@);-- load part
L7 ^ [8 q5 z7 ^* {8 O% @ f6 R m @.CurrIcon := "load";" ^. |" G# M* s8 K8 `+ L4 F) l9 J
GlobalDistObj := part.globDestination;
7 F% D5 I- w. n assignLObj := rgmanager.rgAssignL;
/ B" k* Q, g; K" j row := assignLObj.getRowNo(GlobalDistObj);5 A9 ?3 q( d$ \
if Row = -1 then -- since 70
& C6 D: L: T* c. w if lan=1 then
5 l; W7 U ], D( w9 n) r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 E5 Q$ H& l; `% ]
to_str("in der Andockstation: \"",?.~.name,"\""));
. y+ J8 X8 h1 \7 O else
- g" h5 V' t; V& B5 p% \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! s7 K* E7 x1 M" N
to_str("in docking station: \"",?.~.name,"\""));
3 J; }8 a x5 o# S, c: P* G end;$ S+ k$ ?( _0 Z/ L
else
6 ?, o ?) Q4 j( d: y* H4 E @.Destination := assignLObj[1,row];# N! @/ n* K) g" n
end; ! v) O. @' f& ^+ I/ E
newDirection(@);
9 |& L, m1 p- o/ D4 U0 L! A- [ @.HasOrder := true;/ Q& q- r- V( u2 j
end;/ `& N; X" _, Q) {8 Q
end;
. M, Y7 K1 w) v0 L4 ^+ r# T3 @end; -- of the method
$ p- d w. \# N9 [; E |