/* called by: entrance ctrl of the object 'track'( M. q7 {! v- k- X P
*/
5 K6 P4 Z, |3 J9 h: Kis! R4 l3 V2 `* Y9 w. F) p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ?5 z+ H8 N+ l" t6 j2 t# B4 l1 ddo
% c5 M: S( r5 s' M0 x* |! p Lan := rootfolder.Internal.Tools.AOLlanguage;5 m2 D6 f. W- o8 V2 [# h) t
if current = @.Destination -- else return: N- O3 S0 J. p( I4 X
then# J) z. X a+ X$ |: h) F
@.Destination := void;
3 P: z4 x" m8 p+ d+ k8 d: s6 K3 L( X if @.occupied then
! t$ r0 B. O3 Q* o2 ~ part := @.cont;4 t8 A8 U6 a N" ~; s
@.transpOrder := void;
) \8 T( H- E4 v* ^0 z" ^( @0 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! {! ?3 F5 ] R6 b* _, x @,root.eventcontroller.simTime);
; J$ t2 S1 N4 w @.HasOrder := false;, a9 Z% b9 W: H; ~! z: i3 O3 x
@.DrivingHome := true;
5 p: Z$ G0 x7 q6 `7 `2 D rgManager.tryToStartTransOrder;! |$ v) `' N: B5 g
if @.Destination = void
; P% @4 N0 r3 V b; s2 }8 x then -- no transport order for vehicle @
4 Y; i7 O) E/ i; J: q8 s5 e0 q @.Destination :=
+ ?" A- G$ h1 }( n rgManager.nearestFreeStation(@,track.~);
, @) ]1 y5 a |& ]- c newDirection(@); 7 d7 {2 s! V, m' i
if @.Destination /= void then& L6 L5 v9 _8 i
@.Destination.NumReservation :=" @- N3 I8 g- W+ U k! N
@.Destination.NumReservation + 1;
# H+ P" K2 B2 E% K! q end;
1 h' R0 [7 y9 b2 G/ [5 _, g @.CurrIcon := "drivingHome";1 }9 l8 m! u) F1 B6 r) ^4 p5 d
@.DrivingHome := true;$ m/ x8 w' x$ B& |* g
end;
* {- N3 W8 G( [3 s1 l+ C else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 X' e& K: ~ e1 M* f) e
part := @.transpOrder;! z. k1 r% H) u: s7 l
part.move(@);-- load part* y: D' y+ o* U! k
@.CurrIcon := "load";7 T+ k8 W9 Q% h ^! ]6 `
GlobalDistObj := part.globDestination;0 D, W) k* O* U; ~0 d
assignLObj := rgmanager.rgAssignL;
! R" r% f; v, i4 ? row := assignLObj.getRowNo(GlobalDistObj);
; t% S) e& t! R+ Z' I9 H7 ^- U if Row = -1 then -- since 70$ N; s4 ]! d2 p4 C4 D3 q1 {
if lan=1 then8 F) Y' D- S% j! w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
T0 e* G$ P! ^/ |. O to_str("in der Andockstation: \"",?.~.name,"\"")); B# }# D5 F) X' ]
else
( p k8 K6 J7 [% F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 H( n5 p, v7 o! I& D" d7 R9 y6 m
to_str("in docking station: \"",?.~.name,"\""));
3 y7 i; _- b% N2 H: K" j6 Y4 D end;. B9 y8 l, A$ d! _/ G" t
else
5 @5 j. E9 B) x8 K8 h/ A @.Destination := assignLObj[1,row];
3 b4 k, i& Y# v end; 8 i3 Q* x& [) X9 U# f
newDirection(@);
" H7 S) l0 ~0 q* Q$ h @.HasOrder := true;1 Y V+ w: Y) `
end;
% H' `- B/ }( {, G5 ^; \3 T; C6 C end;
) h8 Z# y4 W/ q3 I% j4 eend; -- of the method
" ?* y; e$ M3 }! ` Y/ R |