/* called by: entrance ctrl of the object 'track'! A5 d% r1 V' n% A4 [- z$ i
*/# F7 F# |2 S& H5 R8 a1 K
is
Q" K9 d6 R- l( A- b& H part, GlobalDistObj, assignLObj:object;row,Lan:integer;- `/ T4 j. ^/ Q, `0 J. h
do" S8 N# a/ C& I7 w7 E. M
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ m0 p% b* |2 i) h if current = @.Destination -- else return
0 [( R. m0 P0 @9 E. J, v then2 R5 F% O( r7 t
@.Destination := void;
* V+ S6 j" T& O( ?8 e) z; `3 x/ p0 v if @.occupied then( n5 r4 s: K2 e* B* h; V% s
part := @.cont;
9 P1 [2 w2 j1 \: Z @.transpOrder := void;& P7 h/ L6 w' N: l; `/ C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ A" }5 a0 |) g# `$ c m5 Y2 ?$ s @,root.eventcontroller.simTime);
2 c% T3 q% w" i; N7 H5 N @.HasOrder := false;* `! T1 {$ @& C8 L. ^
@.DrivingHome := true;, Z- V: b& n. R, Z3 X" r
rgManager.tryToStartTransOrder;
* E' p3 I" g" C! Y- A* {$ M if @.Destination = void) ~: q) E1 b8 H, T0 X( M
then -- no transport order for vehicle @1 h- b, s4 @ \3 }
@.Destination :=
: d' u. k7 p8 e rgManager.nearestFreeStation(@,track.~);
( C) @$ u8 N5 u0 d newDirection(@);
n1 G% u x; ?( x5 B# n" x, k; n if @.Destination /= void then
; N7 A2 h) o4 ^ @.Destination.NumReservation :=2 Q4 h- O: E6 }5 ]1 S# V9 J
@.Destination.NumReservation + 1;- x, x) X# b, b( f6 q. L2 u
end;
/ V8 m( V4 \; z/ R5 c& y @.CurrIcon := "drivingHome";" {# |2 i( }2 M0 I# l# c
@.DrivingHome := true;. A, D$ p9 K# I( @
end;& a2 Y% I4 q' ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& X0 _* Y0 V% W: ]
part := @.transpOrder;* D0 n; e( o9 w% I: K
part.move(@);-- load part' I$ D# L; ?$ k4 H
@.CurrIcon := "load";
; l8 D9 c r4 n' }$ Y+ m5 I- U, K GlobalDistObj := part.globDestination;' z8 U4 [. `, z# \& e/ I
assignLObj := rgmanager.rgAssignL;
$ M4 |9 i( }- s# s6 l$ f/ i: m row := assignLObj.getRowNo(GlobalDistObj);
# K& ^5 y; d3 t4 i if Row = -1 then -- since 70
* N0 m/ d1 P8 q) C5 | if lan=1 then
& c5 q7 o* C9 F% t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; T B% K% w9 P+ K
to_str("in der Andockstation: \"",?.~.name,"\""));
" z g$ I1 A: F w" h else
7 k1 [ V4 E( S9 a! ]; j4 A" p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: r. N/ H" r8 U3 E; g+ u
to_str("in docking station: \"",?.~.name,"\""));
9 \. ^, O5 m" \8 `4 z3 {- n7 u( b O- P end;
) X; i, m9 L3 Q4 p& u" m( N6 ]- K+ Z else
% ^7 r8 \! f' N @.Destination := assignLObj[1,row];* E2 P2 j5 p: G% B, K
end; 2 u+ y! b& f# |8 x; t
newDirection(@);. P1 R/ o; I0 {
@.HasOrder := true;5 [' ?0 i/ T# `; n; x9 X: G2 }
end;0 V% v9 }0 g/ e% T( W f$ t
end;
5 n t' Y5 x2 v& U- l& F' Fend; -- of the method
' E5 r: F5 u; `% x! b |