/* called by: entrance ctrl of the object 'track'6 a- h* x, r: h3 }7 S6 O
*/( G# A, T2 x1 R [$ h1 W# j5 ^" |
is
; S0 |6 j" s$ b- q' [2 U+ u6 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# M# n* S* e9 R; udo) ^0 r9 \: I' d0 o* r* k+ X) b9 }3 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 e6 y' _/ v3 L" D if current = @.Destination -- else return
" H! L9 c: j, h, L% K1 I then
1 j* B+ b/ [, q @.Destination := void;
3 x/ k# X: z& j1 z1 W4 }0 C if @.occupied then- o+ n a: i1 u6 H. j: u
part := @.cont;
4 `8 B1 G9 J" c4 Z/ w @.transpOrder := void;4 s2 E8 C3 X4 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 _$ J0 M$ q; ~5 H# x$ \1 |9 p @,root.eventcontroller.simTime);
+ k% z" y3 g. s( [9 l7 M$ W @.HasOrder := false;* M- J4 t" V) `1 a5 d
@.DrivingHome := true;
8 i% U; r! V9 N rgManager.tryToStartTransOrder;( j' L4 e/ a4 F- ~* p2 ]
if @.Destination = void
) K. M1 P# _: U( ?7 R |' y2 h then -- no transport order for vehicle @
! B/ p" [# K1 F! R" r- F @.Destination :=
; b! ]* U a1 O/ O% ?, ^4 k rgManager.nearestFreeStation(@,track.~);
: E! z: x3 [2 `0 ~. m newDirection(@); 3 G) P. d \3 I8 ~" M$ t
if @.Destination /= void then5 W# D' S# O% A5 `) E/ s
@.Destination.NumReservation :=
% z G5 T5 y' v3 ^! Q" b& @ @.Destination.NumReservation + 1;
: c1 ~8 v$ X* K+ ^0 b, ~0 r% v end;4 N5 m4 O" b% ^3 X" U
@.CurrIcon := "drivingHome";# J( z: V. J& @8 r
@.DrivingHome := true;) ^& o" ^! G6 I6 t) i5 b6 G
end;
2 X# Q+ u& M( M: A- H7 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 s, N5 M! [& E( }6 l/ `' ]6 _
part := @.transpOrder;
" `; H5 D2 G3 X0 W1 X& Y$ O part.move(@);-- load part
+ _9 J: W @7 Q8 p2 [8 J5 L @.CurrIcon := "load";! N- c- a) n+ T8 U8 `8 K W1 T
GlobalDistObj := part.globDestination;; W, q; s, B5 o A( W, \# b
assignLObj := rgmanager.rgAssignL;* Z- E3 `: w1 k2 T$ D, g/ A- |" V
row := assignLObj.getRowNo(GlobalDistObj);! M8 K8 F# `5 }$ x" z9 q
if Row = -1 then -- since 70
! o+ h6 H: L- e if lan=1 then5 _& O6 @0 h0 \9 T2 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' b# a# K) {: e
to_str("in der Andockstation: \"",?.~.name,"\""));
, G; y7 z) w& ^$ g else7 b+ E& o3 J5 b, s R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ?3 j. @. L+ I# n
to_str("in docking station: \"",?.~.name,"\"")); : ^8 Y3 n5 X- |9 ~( ~7 j8 G" H0 u
end;' L' H" Q4 j6 N5 N. k% y9 T0 O
else9 l4 M' C: h7 Y4 P8 L5 ^
@.Destination := assignLObj[1,row];
/ [% o$ _$ N/ Y end; 3 L; K3 C$ S. {# O4 ~1 [+ M/ Z
newDirection(@);
! y- }5 V# H4 n3 X) Y7 u. i @.HasOrder := true;
% W2 L2 C( ?6 w9 V) a end;. k4 j0 q2 N- b9 k
end;* k( {( C6 _: r. d$ j
end; -- of the method
! x; n2 C/ L2 O) Z% B |