/* called by: entrance ctrl of the object 'track'7 s' ?; Z9 O# Q( `: A; V m7 j; p1 X
*/
4 J# C5 _- l8 [is: Y6 V F( s, _. G9 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! r4 o/ k2 d( x8 R! B; O' u
do; Q) e d" h" e, `2 @& ~$ Z
Lan := rootfolder.Internal.Tools.AOLlanguage;5 r0 Q: J5 `# a, g
if current = @.Destination -- else return# f9 f6 X- }7 r l" |
then' M& q: m; e% `) c! J# U
@.Destination := void;
# d! U9 z/ O* U+ d$ F if @.occupied then+ \- k, K: [* v
part := @.cont;0 o3 H: g% G8 y9 M4 d
@.transpOrder := void;
' |3 A0 o* _$ X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( N1 b" E) L3 l& V( j. ^ @,root.eventcontroller.simTime);6 M$ w7 ?: Y, f0 M* p
@.HasOrder := false;8 L8 j4 z- a& Q
@.DrivingHome := true;
5 f& s- k: D$ w# g$ K rgManager.tryToStartTransOrder;
- U7 z6 d8 _' s6 N& w& } if @.Destination = void( K$ v" U" X/ C5 g7 y
then -- no transport order for vehicle @
: r9 O' w- P. p- P& f @.Destination :=/ ^& m. f% Q7 b" c+ \
rgManager.nearestFreeStation(@,track.~);
! Y5 O& d6 J% v, X) w q7 n newDirection(@); ; s# j: Z: D' d" D& ^
if @.Destination /= void then* w2 L" w! \4 P- k+ E( p9 S% t
@.Destination.NumReservation :=
g( j3 Q3 `& K) R( l% J @.Destination.NumReservation + 1;; w' [! O. e, v, j' s) w1 j! ~
end;
6 G7 \9 h: n6 e7 x @.CurrIcon := "drivingHome";
& T L/ z% q) z/ S5 x @.DrivingHome := true;, b- S7 E* P/ ~3 F& F- t/ V
end;
8 g- I1 Q: X' ?1 j: J/ I" x) D else -- the vehicle @ is empty, both vehicle and part are in the same dock station" Q: f: e( B+ {( q: G
part := @.transpOrder;
. [% ^4 Z) e( L/ X part.move(@);-- load part2 y7 N1 T6 f7 K* h
@.CurrIcon := "load";
# z$ g- Y: t2 Q7 e) n$ n" [ GlobalDistObj := part.globDestination;! ^* y6 {- y7 p8 N4 y0 P0 s% o
assignLObj := rgmanager.rgAssignL;
$ R% E( ]) r& w2 x+ q row := assignLObj.getRowNo(GlobalDistObj);
* O9 \; B$ g* B: u5 V if Row = -1 then -- since 70
; G: [: @2 [0 p& Y, z8 c: V# ]; O if lan=1 then
; X, ~8 }# {) |* H% u' |: h/ b3 |( L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Y# s W! ~, q3 w6 L6 N' z0 E$ I1 J
to_str("in der Andockstation: \"",?.~.name,"\""));
. h$ c) J, c' s/ @* C) k else
. h3 K! a; Y0 q! ~& N0 X) X p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 V: n$ _8 B! t4 w5 T to_str("in docking station: \"",?.~.name,"\"")); , |/ }4 C* q) Z0 z
end;7 Z! R& y6 _* m; x* r
else9 Y3 Q7 I# D6 c6 g6 Y& a' H9 q+ R
@.Destination := assignLObj[1,row];" s$ ]2 }3 G$ S# m6 U5 H7 P) y8 C7 E
end;
# b/ ]+ ~5 c4 I+ s newDirection(@);
& @6 V$ T _. f! Y# f2 Z' O @.HasOrder := true;
' ~# J! f( X! P# i+ R6 A, ? end;
, Y) V7 t' {4 G! b' G end;
8 F( ]! w0 t( g1 X X1 Uend; -- of the method
8 G4 H' A: j5 |5 l- z8 j |