/* called by: entrance ctrl of the object 'track'
4 |% S' n- W; u; u: f& Z- ~* J*/
; \7 i2 r6 N# N3 G- ^- m% u# q( tis
# Q4 }: Y: h7 J9 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;! X3 x8 T7 ^; c/ F; Y# T, [
do
% A* M: A* }$ I" i# p% N7 M, z! z8 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
( T# D3 m, x' @1 n" V if current = @.Destination -- else return6 J" u: I. x& `( S! _0 ]: t7 Q
then
8 z4 C( I2 V8 |% R, f+ Y' g @.Destination := void; V% r% Q* c/ P/ s( X! m
if @.occupied then) F W# z2 D# A2 Y* p
part := @.cont;
' B6 q' \$ v8 C1 | @.transpOrder := void;
* y& G f8 m# s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( P) u+ N1 p/ q( h2 o, ?9 z# z; l
@,root.eventcontroller.simTime);
- w4 w% f; |( c2 i) { @.HasOrder := false;
( w% y( H8 r8 D! t- o1 _ @.DrivingHome := true;- B/ G2 B3 T5 i& j: ^0 s
rgManager.tryToStartTransOrder;
4 |5 C9 C" m9 T! C; v* m# Q if @.Destination = void
& ~$ e' |. a( E6 P8 x" Y then -- no transport order for vehicle @: M; M6 y, d' X( o5 ?( S
@.Destination :=
3 e4 A2 i- y# S" Q7 ~/ \ B, d# H rgManager.nearestFreeStation(@,track.~);8 S% b) u) O! w; n' `! l: g
newDirection(@);
& ~! a* c0 V3 e; ?8 o if @.Destination /= void then
1 C% y1 m& w( {/ o- v8 ?! ? @.Destination.NumReservation :=- ]/ U: ]3 g, A' L$ F7 L
@.Destination.NumReservation + 1;6 G2 s5 A/ j+ P& n/ K
end;" _$ d8 x5 g$ p1 f, f5 ~
@.CurrIcon := "drivingHome";. P; B- }: U# G/ f. D
@.DrivingHome := true;
& F& l6 R2 }# ]9 K" J4 l; d end;$ w, y( e) C& x: }4 |: M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 r5 U4 x) m( g& e* F
part := @.transpOrder;; K% A2 f. d3 m0 w- C
part.move(@);-- load part8 T L, N$ l7 H
@.CurrIcon := "load";0 Q$ r( Z- a2 F0 Z7 E6 p( f5 ^
GlobalDistObj := part.globDestination;3 ~5 f1 y& F( _2 r" S
assignLObj := rgmanager.rgAssignL;( R, ?( a" ^$ g' R6 `- {' J9 K
row := assignLObj.getRowNo(GlobalDistObj);
% f0 l, Q" W. D- P* P! C' n if Row = -1 then -- since 708 n% Y2 J0 F' w0 c! @; C
if lan=1 then
% x7 v2 o5 V" _2 e L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# I" m. U$ F: u: r( f% z d
to_str("in der Andockstation: \"",?.~.name,"\""));5 F) [% N0 T) m- i( t: J$ x) r7 |
else) r0 Y6 b0 W% a- D$ i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ M0 K1 z2 R' q" { [! P to_str("in docking station: \"",?.~.name,"\""));
$ h! ?* Q2 w2 P; z- Z5 y) s end;
0 ^+ z5 K% v0 K- m else
: }" l& I8 f6 g, K! n8 g0 D) F% I @.Destination := assignLObj[1,row];
/ g3 T" e6 C9 N. q. j$ V end; / S3 {8 m* V; y6 u
newDirection(@);3 H7 ?" r c7 s( }3 A, V
@.HasOrder := true;
5 J& Z3 D* E5 c7 d end;
# J3 h7 {! E! K* i: V end;0 [) X, }+ }+ I r u, K" `, F
end; -- of the method; f) ?! R, z- m# t' H$ Q8 M
|