/* called by: entrance ctrl of the object 'track'
3 f. m% M. C5 K$ \3 n/ Y*/
, l0 n7 O3 E5 c ~" t, zis
^$ `: l, Q+ t) R* C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, B" Z3 u0 a5 |do
) j' i2 b6 b, P* \3 ? Lan := rootfolder.Internal.Tools.AOLlanguage;
$ w) I% G9 F$ O' q6 p* l if current = @.Destination -- else return" m) o7 V2 W4 W f. h9 k
then
5 Z! Y) g& Z# V @.Destination := void;
" W, r9 B1 W, u" O0 _; V) U if @.occupied then
/ X1 u5 D$ x; {$ u+ \! a part := @.cont;
. P! h, t# p0 }) v2 Q @.transpOrder := void;, P7 H' ?. F5 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# D( w3 R! c# P6 N/ h @,root.eventcontroller.simTime);
& ~7 W1 @- w, F* U$ Y @.HasOrder := false;' B0 k# H3 P; l
@.DrivingHome := true;
" Y M6 T& R1 U rgManager.tryToStartTransOrder;
* `( C% l1 B9 e+ \% q if @.Destination = void
) x% ~8 L8 Y4 N. P; h then -- no transport order for vehicle @: d I4 u4 u4 s! ~( p& U$ A
@.Destination :=
% M* o, m; {4 O8 R+ l rgManager.nearestFreeStation(@,track.~);
, m$ p5 b& G% x# \7 @$ ] newDirection(@); ( x! K, Y- \1 |: u" [( f4 Z( @' {
if @.Destination /= void then
* _& X2 u, Y' o @.Destination.NumReservation :=! z5 _( k7 g- w/ P# Z+ N0 A
@.Destination.NumReservation + 1;
/ L, h, O" F% J end;5 S k! C5 L/ N4 H7 C6 D \
@.CurrIcon := "drivingHome";! @+ j) R2 K0 J3 M/ _( S1 u8 J: ?
@.DrivingHome := true;% I8 b: ]1 [8 H- A7 Z' e5 D( W
end;
. }1 L( z" K6 [+ }4 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 V7 S4 D% ], K; u
part := @.transpOrder;7 H+ ~/ _- u# W
part.move(@);-- load part
& `5 Z3 w4 ?* h$ C @.CurrIcon := "load";
8 x/ V1 ?. x. D1 b7 i GlobalDistObj := part.globDestination;( j8 p# d4 `- H" V) O% O
assignLObj := rgmanager.rgAssignL;
3 E* o+ C( _3 J# c row := assignLObj.getRowNo(GlobalDistObj);- l+ @ I: P1 Y+ J5 |: k! a
if Row = -1 then -- since 70 I ? ?% u+ }9 R- l9 i
if lan=1 then, d/ S7 z) b8 Z- U, N3 N& V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' o p: P7 f( s4 F2 Q to_str("in der Andockstation: \"",?.~.name,"\""));: T8 ], W* r0 \
else
0 Q9 I" `- N6 G) [) q. \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; }2 `! c/ O/ o to_str("in docking station: \"",?.~.name,"\"")); ' I4 _2 G- Y) r3 l h
end;
7 U3 y ~, q3 b; e& ^ else7 e- ^8 |! k7 I
@.Destination := assignLObj[1,row];* P0 d' x' N1 B4 @6 X+ x
end;
* e1 H- }/ f6 E1 }1 R newDirection(@);
# n4 g3 ~5 _7 ^6 K( g- j @.HasOrder := true;" a% g3 G/ h' G" A0 L% b) d
end;
& r3 Q0 f/ Q. J! z( N! q3 }0 C end;3 }5 Z9 }. T8 V$ B, Q& c
end; -- of the method
6 e# ]4 V! o+ o& @1 y |