/* called by: entrance ctrl of the object 'track'
: {% I& o3 j8 z9 W*/$ d; b, c" m' ]
is* r' j& { h1 ] u5 v% {: i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, q) J6 n$ ]7 x% ~
do
. j2 M! O- t! x* Z Lan := rootfolder.Internal.Tools.AOLlanguage;0 o/ _9 O, b/ }8 e) X9 [; v
if current = @.Destination -- else return
1 \/ P) B( {9 V then
* K' T( m! g& M: L0 I& D @.Destination := void;
1 J: y* e: B$ Q) z9 e if @.occupied then
3 d, p% s5 k) K0 c+ Y part := @.cont;
8 d4 X% ^* [0 C6 T @.transpOrder := void;( S5 B" e7 F$ Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ A, E: P4 D- o$ u8 O+ }( q @,root.eventcontroller.simTime);- V: o5 o9 V2 j8 z; N$ b# E
@.HasOrder := false;
0 o$ |7 C, \5 |( g2 a3 G/ p @.DrivingHome := true;
; G9 X7 F1 t- i' h rgManager.tryToStartTransOrder;
; `0 Q* T+ J, s if @.Destination = void1 ]9 P0 t+ v* c3 K4 q/ `
then -- no transport order for vehicle @
7 C+ W' ?' F2 m+ W6 |% B @.Destination :=
. W0 F4 L% i( }1 w9 \% \2 e4 ? rgManager.nearestFreeStation(@,track.~);
6 [. x4 r+ j. w- o6 z, q$ K5 O: _7 m! E newDirection(@); 0 `) k8 j s8 Y* v- j0 Y
if @.Destination /= void then
" a$ B; F! T; V @.Destination.NumReservation :=
2 ?) o" g% P- m- O; x @.Destination.NumReservation + 1;
; z4 v5 R, f, n0 N0 r end;0 ~2 y' S5 S% f8 P/ d
@.CurrIcon := "drivingHome";
7 d5 B+ h0 m9 ~ O$ ~( @ @.DrivingHome := true;; } E# p, j% H
end;
+ l, x9 Q8 A7 v9 y1 o) J( J' h else -- the vehicle @ is empty, both vehicle and part are in the same dock station, g+ F' }' M& m& n
part := @.transpOrder;1 \$ ]+ ?5 y% r4 s- x0 m4 A1 ]
part.move(@);-- load part. e8 @7 ~7 B: k7 V
@.CurrIcon := "load";# D: b* X$ ?7 d. U
GlobalDistObj := part.globDestination;% x& ~# G ` p5 `
assignLObj := rgmanager.rgAssignL;* {+ r6 i4 U6 R. G7 l, q9 h$ u
row := assignLObj.getRowNo(GlobalDistObj);, p+ ~2 {. l! t) u: ]. F
if Row = -1 then -- since 70
! ^ X/ k8 v. l2 z2 L. i if lan=1 then9 y. n# ~5 N' Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% s( C" o- Z0 L" w to_str("in der Andockstation: \"",?.~.name,"\""));
1 ~+ B9 r8 v1 O+ `6 o% | else
& m8 Z2 ?- m& |7 r! W9 U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# V6 N5 E6 j$ G to_str("in docking station: \"",?.~.name,"\""));
+ p2 P6 B: \9 |- g* o4 c9 L end; x9 h/ x' r0 s9 `% k4 }- e" C$ @
else" E2 |/ j( v. \1 P- w
@.Destination := assignLObj[1,row];
1 K% {- F5 d5 R6 q end; ' ~% _( N/ x, l1 ~
newDirection(@);& a5 O, _. d* L# ^
@.HasOrder := true;' G+ t' l8 w, G& T
end;' h' [# M0 p7 u
end;
( h' c( n! V, gend; -- of the method* F1 v7 c0 H# o
|