/* called by: entrance ctrl of the object 'track'
2 l& h: N$ Y3 \( H) n( Y*/& g! G+ \( s/ q7 _) E& X/ I
is
' _' k6 b( f. c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# c0 o# c* z6 [' c8 a+ w# u1 `do
% s- H8 E1 E- E( |. g Lan := rootfolder.Internal.Tools.AOLlanguage;
( }- E5 Z7 h Q if current = @.Destination -- else return
+ _ P* y% ^; w8 M2 j* l then
3 ^9 U+ Y: Z# B t4 J, q: q! P @.Destination := void;
/ ~! C5 |; w' G* @8 j8 _6 n7 ~ if @.occupied then
6 `2 \( J/ c9 L3 R! g2 Q part := @.cont;7 i( b8 @; q- Z: z/ p
@.transpOrder := void;0 O* N4 ^, S8 j% {/ S+ M2 }8 g3 r; A# X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- l, S1 V1 C% z& \
@,root.eventcontroller.simTime);! j& U4 N" _/ ^: R
@.HasOrder := false;
k* y2 q0 c/ O. \ @.DrivingHome := true;
: C3 y7 f: N6 U' ]! s I! o rgManager.tryToStartTransOrder;. N2 n5 H/ @1 Q/ D
if @.Destination = void
4 V- W: r( t& u8 V4 b then -- no transport order for vehicle @
* @; A% D( i( Q4 I- U' S4 {! @ @.Destination :=% i* J- {7 u9 a
rgManager.nearestFreeStation(@,track.~);
' U- }$ V: | x- ~" ?( z newDirection(@); : h7 }# N/ ~1 h i% K2 `$ f$ y
if @.Destination /= void then8 a# A* h6 |" I- V
@.Destination.NumReservation :=
# ~; d- G0 z2 J9 B& H @.Destination.NumReservation + 1; V, q; q0 E+ Z+ t4 T
end;
( `1 W/ J! u6 J* W5 N$ Q3 Q @.CurrIcon := "drivingHome";5 a* B' p" {2 d
@.DrivingHome := true;. V2 i$ e6 W( M5 _% D+ O! t6 |# {
end;) E8 `. F7 x) W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 z7 e# u& m' k# F$ d5 ^, q& D part := @.transpOrder;
$ R7 V; I; H# C' T- j: ` part.move(@);-- load part: V# z$ @/ ~8 v, a3 q/ c
@.CurrIcon := "load";8 v3 ^2 z& M9 r' S: W8 C m
GlobalDistObj := part.globDestination;
) n" {4 w/ I) A assignLObj := rgmanager.rgAssignL;
. F6 x4 i+ h# w# H8 J" j row := assignLObj.getRowNo(GlobalDistObj); \- U, J1 J0 o( {& H) U
if Row = -1 then -- since 70. d# n1 Z( E, g/ `3 M' y* A
if lan=1 then7 H9 o) a5 P- L# U: Q) o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* P6 z' Y. f! b0 }
to_str("in der Andockstation: \"",?.~.name,"\""));2 I* x0 f! R/ ^ p' ^. Z
else
, A3 ^5 b: G; c3 Y: E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), z- a$ X1 A8 k
to_str("in docking station: \"",?.~.name,"\"")); 1 b1 E1 N4 n! B8 w$ C. E
end;6 p' m# o. p3 o+ }4 b& p4 Z+ N
else
% h3 d8 O+ f c. ?! O/ a @.Destination := assignLObj[1,row];8 N7 @9 ^4 u# e. r; z! d- V
end;
; l/ z" ^/ f6 R' A8 H: a8 t3 u newDirection(@);
3 b; M# P" W) }% r* g' x2 p @.HasOrder := true;/ Q8 h7 g0 e9 S: R9 F& k* @9 a+ s
end;- A- }) `4 ^; N j5 ~
end;
2 y9 T/ t' V% K. S9 u6 h# Yend; -- of the method
1 n# P* E2 n9 ~1 J l4 N' q d |