/* called by: entrance ctrl of the object 'track'" G) O4 }4 Z+ J( o
*/
# }1 [2 \4 m# O3 R# i" Jis
8 s. z2 Z. e0 V/ w7 h9 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ e# S3 e$ F8 {& I* M4 z- @do
: g: r2 _5 k" q, ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
H( z7 Z/ X; d if current = @.Destination -- else return+ T" \; K4 q# x; u5 c% r* Y
then- ]. \0 k& V f& Y
@.Destination := void;" g2 w) J1 W, A7 O/ j0 U/ ^3 W
if @.occupied then
# w/ E/ e" H, x; I [+ Z part := @.cont;
1 h+ p# F& P% [ @.transpOrder := void;5 y( f, w) ^2 F L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 d* }' p( K" W/ k% \; ?
@,root.eventcontroller.simTime);
Q p$ L% e( V' Z( B2 H) |8 k @.HasOrder := false;2 p6 Z; Z+ J* [
@.DrivingHome := true;
3 g5 v) _- p, i: U6 h* j- y rgManager.tryToStartTransOrder;
2 H- l3 o( J0 r if @.Destination = void
# j. @% |% ?* g- f- n0 x; s' u then -- no transport order for vehicle @
]! P! \1 m7 h @.Destination :=
/ f% C, T# ?$ b3 i( M* E rgManager.nearestFreeStation(@,track.~);
1 A( o% V3 A' R/ x, J2 } newDirection(@); ( S* s6 h7 @; N3 |* ]& {
if @.Destination /= void then
8 T; I e8 G0 P# L2 Z5 L. k. U4 \ @.Destination.NumReservation :=
: l7 }+ b9 ^8 w- L7 v2 e1 q) u @.Destination.NumReservation + 1;
+ C( L+ o$ M# V6 I* v5 N* p end;% l$ }2 B Q4 s. x! A: ]& K
@.CurrIcon := "drivingHome";
5 N9 B6 E2 ]" b) e# M' L: o4 P @.DrivingHome := true;2 C! S! Z& q- a
end;% C1 u* G. k7 Y& G# j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 {: p4 p4 s f$ } part := @.transpOrder;$ n2 ]# U7 V4 Z
part.move(@);-- load part# C4 _4 ^. U( H' _0 l6 G6 ^
@.CurrIcon := "load";
& {# Y* s$ }$ k) G% b [ GlobalDistObj := part.globDestination;$ g$ y* h/ v" G: X `8 H4 a
assignLObj := rgmanager.rgAssignL;
/ e$ P$ [5 b3 x( o v0 | row := assignLObj.getRowNo(GlobalDistObj);) Z( `, `& v6 s5 ?7 z2 A
if Row = -1 then -- since 70
9 i7 L+ h3 P5 a" w# H/ J1 u if lan=1 then4 W! m l) Z9 ?+ V4 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) G, x& U4 b9 X# B6 \6 ~. y to_str("in der Andockstation: \"",?.~.name,"\""));
- O4 K6 W; j& \* w( f else
# d0 d- _ f8 N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# M% M# [2 J f3 ~+ E
to_str("in docking station: \"",?.~.name,"\""));
& o! P# P% V e5 e, [ end;
5 ]; E# B! x6 U9 u v else! K0 D$ d/ q& v4 ^6 ~6 a
@.Destination := assignLObj[1,row];
4 \3 c3 J/ w, I end; * a: Q( ?1 u$ J0 z A
newDirection(@);
3 z+ o2 m, M" q; V/ [! } @.HasOrder := true;
& e4 w+ i6 ?& Z! v( @ end;
$ @* C* ?1 f" D& V, G9 w end;
$ ^- H7 \6 H) dend; -- of the method
6 I6 n P9 q2 ^! u, B) ], e+ Y+ K+ t |