/* called by: entrance ctrl of the object 'track'7 P/ H. S* V5 _: q" `0 V: n3 }
*/* J v2 x* N/ b- [
is: f" h. K6 o) b0 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- v' t* p, l; B7 {
do+ U' p! H* j2 ?% {1 O3 }
Lan := rootfolder.Internal.Tools.AOLlanguage;0 L# F! J3 _$ z2 a \2 x9 D
if current = @.Destination -- else return5 {2 }. p1 t2 U( W; j
then
/ F5 O0 i: [3 e3 \# f, Z" f @.Destination := void;& f" o$ l1 s$ x# E& W
if @.occupied then
1 ^3 d" N( S( J- i% | part := @.cont;' `/ D p6 X% w. Y: \
@.transpOrder := void;
6 y$ v* m1 `5 D( X) f4 l9 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: `0 s: \, k$ K/ \5 t$ ?+ e2 C" H @,root.eventcontroller.simTime);/ s) t3 B" \ {
@.HasOrder := false;
1 C8 w: e7 m5 m9 |+ T @.DrivingHome := true;% b- R% _. x, W# ^: ?
rgManager.tryToStartTransOrder;
$ _+ z' Z3 o+ Q! o' W Q if @.Destination = void
- f2 h4 z) s7 j0 J. I" ] then -- no transport order for vehicle @
6 n; S8 O* ]) l) S( G$ z5 @ @.Destination :=9 t" v' A4 C/ a* R
rgManager.nearestFreeStation(@,track.~);1 U9 l$ U6 C! |9 I |" H$ c
newDirection(@);
9 L5 _$ s, j9 a if @.Destination /= void then- x3 F" ~5 R+ e
@.Destination.NumReservation :=# }' {) }; ~7 Y& i2 L: {
@.Destination.NumReservation + 1;, e; U, V$ ]7 I8 D# l1 p) k
end;6 w$ K, t. Y, J+ ~* h
@.CurrIcon := "drivingHome"; J- i+ k! ]+ N6 U
@.DrivingHome := true;
5 i$ [3 M' J* I+ K. z' X. m! V: W end;
1 b/ }1 x% ~# ?1 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 I( D& R. m( n3 _3 g
part := @.transpOrder;
4 |( M: o& U0 q4 Z part.move(@);-- load part
( A0 F0 y6 V5 Q1 J @.CurrIcon := "load";5 B5 x3 o9 R7 C2 E% J! i
GlobalDistObj := part.globDestination;
7 }* L+ B3 i, a assignLObj := rgmanager.rgAssignL;
( n2 G" v/ ~. O% Y3 K; w7 J2 k4 ` row := assignLObj.getRowNo(GlobalDistObj);
4 L) H) m2 [+ O" D) h if Row = -1 then -- since 70' A3 ]" F1 K$ O3 |2 _& I/ l- ?
if lan=1 then Y0 ]$ m. X6 R& v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 P' w; N. g3 Q to_str("in der Andockstation: \"",?.~.name,"\""));
6 w$ M9 H) E2 D; a6 d5 P' w( S% m else
7 K1 H1 I |0 O- n/ v! r+ q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( Z- z! l/ E5 X! W' N( n to_str("in docking station: \"",?.~.name,"\""));
2 W4 G# ?& z; \# C0 r8 Q4 H" x end;; ] y+ S( D: t" n' K) O! q
else
, G: j: l0 C* |, |3 S @.Destination := assignLObj[1,row];
8 O0 u5 p2 J$ @. u( B end; D" a/ c, d1 g/ c8 R
newDirection(@);. L0 ^" q$ z7 M: w/ W
@.HasOrder := true;' }! D& t' |# J
end;% C/ u1 l$ J4 q, D2 \
end;
, v: V* [2 E& W9 p7 U6 W& Xend; -- of the method% b- w7 }! t4 A5 ]4 Z
|