/* called by: entrance ctrl of the object 'track'
6 e: K; _" O8 k*/5 ~* ^4 r7 [$ g) n$ n1 ]! O% y
is
5 e7 q6 n$ }( h4 S" L! o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, T' Q9 C5 ^( T4 v( I4 [4 ], a: _do# Q' F2 [+ B0 Y7 |
Lan := rootfolder.Internal.Tools.AOLlanguage;
: J+ T8 q0 p0 B; k! o1 K) |# r if current = @.Destination -- else return
( t8 [7 P( L* F& Q2 J- B9 V; `3 I then! p. k4 g) n1 M: I+ j; y
@.Destination := void;
: ~7 B1 M. r9 L if @.occupied then) R+ e# }0 a4 o1 Y( J
part := @.cont;" t9 k" R2 p' U; K0 X, z8 I8 J
@.transpOrder := void;/ k( s5 ~- L3 h# [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 d$ F# X: n( h9 f- E/ o2 u/ D
@,root.eventcontroller.simTime);: P) A: z$ }, h5 L# X
@.HasOrder := false;* c: ^, }6 v( y- C4 G
@.DrivingHome := true;5 m, _( U8 U# A* r' f% O1 j
rgManager.tryToStartTransOrder;
/ }! \ T6 J' _* V: x' D. g" K if @.Destination = void
# `8 I4 y! P$ E6 R then -- no transport order for vehicle @/ k5 c/ k& D; [2 P( F2 n/ e
@.Destination :=7 j; K' m( _+ R* r. k c+ r, E
rgManager.nearestFreeStation(@,track.~);; s7 F6 Y6 _& i$ l6 ?- n
newDirection(@); / \; J) K+ P) l+ q" h
if @.Destination /= void then
# Q4 V; a7 u5 ^4 q& ~ @ @.Destination.NumReservation :=
- ^( |/ }6 k) o @.Destination.NumReservation + 1;
+ `! k5 r R. u7 ~1 d1 L end;
# S; O h8 A0 V& \3 l @.CurrIcon := "drivingHome";8 Q+ g4 ^4 j- u4 e/ _0 e
@.DrivingHome := true;2 T- B3 o4 B' u# `! w3 c: o9 O7 m
end;
3 l( c4 Q5 R9 I. f) K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
Z _/ J' X' A: }5 z* P part := @.transpOrder;
5 l6 t# f0 h. t1 o0 j6 A part.move(@);-- load part
# f, Z6 ~% j" j7 {8 G' V* z @.CurrIcon := "load";. b& P0 S' I3 C; S# E9 S: w! ^0 s
GlobalDistObj := part.globDestination;
- |) z/ v6 |0 |2 R/ K$ s assignLObj := rgmanager.rgAssignL;
7 j9 O/ p- P! }" Z row := assignLObj.getRowNo(GlobalDistObj);3 ]. |8 a7 U( q; U2 K
if Row = -1 then -- since 70, N3 H/ K6 c+ K* m/ s% @( Z) W
if lan=1 then5 {0 Y$ J a H3 ? {6 b" x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," [! u# R, z# b ]
to_str("in der Andockstation: \"",?.~.name,"\""));
7 I7 R0 @7 o8 ]1 E" H9 | else
9 F1 t" v3 S' H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 T& R* J6 K2 b6 q0 Y% } to_str("in docking station: \"",?.~.name,"\"")); * {" y7 m* G' S( k; \" c' Z, P- U
end;* Q: [9 l7 ]$ c1 s* b" i, ]
else
- F: o/ R) U$ n# V% _' A6 f @.Destination := assignLObj[1,row];
Y$ N/ G# _$ {$ I3 G1 d9 g end;
+ k2 a- b# `0 ^: H: N) [ newDirection(@);
! G5 R! |. I. M: e7 h3 y5 A, B @.HasOrder := true;
; c7 I$ u2 E' w N) y+ y: m end;
9 s1 B1 Q& g: d7 ]& w. j- A end;( V& ^' O. u: L- f7 v
end; -- of the method+ V. K5 P# M" q# C% K m0 V
|