/* called by: entrance ctrl of the object 'track'* [0 l0 M |% S0 x
*/
2 ^& d4 |! N# Dis9 n: Y: N6 a# R1 ]7 b5 c" ?1 N2 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: q1 J8 _# h* n$ ] K7 |6 J: ~( sdo
1 L, g; O) R3 i Lan := rootfolder.Internal.Tools.AOLlanguage;
+ w2 Y- o( q# C9 L* v5 a( X* n if current = @.Destination -- else return
6 `6 U( S+ @7 G4 C0 R; _ then
& H5 {. W1 q: l* H @.Destination := void;
" t( L' ^8 X q" i" z) ~; R if @.occupied then3 {/ F; w) h- ^1 @
part := @.cont;
, y6 r: d! m1 \ d7 G/ j' | @.transpOrder := void;
# U; w" E) r! E% q5 S6 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 P6 M' u, P# F, t) S: T; _ @,root.eventcontroller.simTime);
_8 T- |7 U5 J% U7 w @.HasOrder := false;' }! w) R! m v: a
@.DrivingHome := true;
2 F8 M i% o. B9 |0 c! l rgManager.tryToStartTransOrder;
1 @+ M" k( E1 P* \3 J if @.Destination = void0 y% m. ]) f( _; J
then -- no transport order for vehicle @" x( O- i1 y$ }8 V C
@.Destination :=2 K, e/ v3 K% y( r# W3 \. g$ D+ ^
rgManager.nearestFreeStation(@,track.~);( e0 R2 S3 E& `1 }( b- k
newDirection(@);
0 b+ E$ [7 F6 G, |( k' {. j' ~ if @.Destination /= void then/ O4 X- |, e6 {' x
@.Destination.NumReservation :=* f: h- v6 q& Q5 y* L1 e
@.Destination.NumReservation + 1;! ], B6 r" f7 l0 K& ?0 P
end;
8 I& D9 t& Z' w+ i* d, a @.CurrIcon := "drivingHome";! A+ o( C( @! c" a/ V* z9 p; z
@.DrivingHome := true;
& T& `: _$ k! Y% b- Z! G5 U% } end;
& }' K; p1 t9 N1 I. u else -- the vehicle @ is empty, both vehicle and part are in the same dock station" p; m c. A0 u- Q2 m
part := @.transpOrder;
) s4 j G, r$ N. t2 ^; n5 {* D part.move(@);-- load part
% z0 ]2 g4 r* R1 A0 m. z( U @.CurrIcon := "load";
8 H. G0 l! T; w) D$ S. Z1 T7 ^ GlobalDistObj := part.globDestination;
8 K, s8 C$ `9 R! W0 T/ }' F2 a U+ S assignLObj := rgmanager.rgAssignL;
z- a& @9 K- M, P# o- n0 s. O) y row := assignLObj.getRowNo(GlobalDistObj);
0 t( E7 L5 B; p3 S7 O2 _2 q o S if Row = -1 then -- since 70" b( Q! o! Q4 L
if lan=1 then5 t/ W" Q1 ]8 V- f( N( T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 |( m. o' @1 Z to_str("in der Andockstation: \"",?.~.name,"\""));
c: a. k; _6 S6 v8 B. F else
; r$ U9 N# K4 p5 R! J9 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 _( C# w3 T& d( M to_str("in docking station: \"",?.~.name,"\""));
/ q* ?; M# ^3 e+ u end;
K A% m B7 {7 G else1 r$ m) Y1 a) E* V* @& I6 s
@.Destination := assignLObj[1,row];8 ]4 G1 ]% K+ Q7 O/ D6 P$ w# O
end;
' y+ y. C Z' Y+ m* y$ y newDirection(@);. K/ v" I; z) a* z. u
@.HasOrder := true;
3 V1 c" v5 B @ end;3 O( A/ a, x. u& Q1 I; r; B
end;+ w3 z7 K6 e# ]
end; -- of the method
4 b9 Q# o' N; E$ b) x" }. q |