/* called by: entrance ctrl of the object 'track'
+ a: k* _* `* t*/$ B- H- W" i7 r9 o) G; p; E/ b
is; C4 o z# m; `2 ~8 ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 P! K; w) X: edo# F3 v+ I1 `' Y1 g0 S
Lan := rootfolder.Internal.Tools.AOLlanguage;
. O4 B# A5 c1 I" X' z if current = @.Destination -- else return, M! R+ g0 D) \- X0 U) T U
then
' O1 d! }8 u( ^, j+ a3 b% @ @.Destination := void;6 e( P( x6 f6 K% m9 F
if @.occupied then
# i- p8 N* v S1 q4 ` part := @.cont;2 a5 N% Z- V# X1 S: }
@.transpOrder := void;
' f$ V: ~. v0 @- \( j8 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) ]; l& d' e' X$ R @,root.eventcontroller.simTime);
3 {8 K+ x3 F8 b9 \9 m: w @.HasOrder := false;, `( z: H( P F, z
@.DrivingHome := true;) a0 p. [% I7 f8 U3 E- e# c
rgManager.tryToStartTransOrder;6 \& v4 Z) x* ~, }3 _ K7 W
if @.Destination = void
' y- n2 d$ f9 y5 z) L, q then -- no transport order for vehicle @
/ l( \2 a7 _3 h- u @.Destination :=
T0 `% U" \7 k3 }) q ~! ^ rgManager.nearestFreeStation(@,track.~);
) ]) N& ?* e: T& L2 ~ newDirection(@);
6 q' C8 T6 B" ^2 h9 Y. B* f9 G if @.Destination /= void then
( `+ u' y0 G: z8 G9 c4 | @.Destination.NumReservation :=& D( N4 ^$ a4 _7 r/ O
@.Destination.NumReservation + 1;' l$ L) C" }/ V( _
end;$ ~2 K9 b+ e/ R- z4 A j* \
@.CurrIcon := "drivingHome";
# G! z: Q, D# a T8 X& K. w @.DrivingHome := true;
$ E/ [' o* Y1 w; B. _+ | end;2 B; Q* D; G% k) ~& G; d8 s7 q4 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% x5 _+ W4 ?% o/ I2 U4 s4 z& Q. m part := @.transpOrder;% o& X6 d" ~5 Z7 o: [
part.move(@);-- load part
4 i# w( s& d* g4 j% G7 e, b @.CurrIcon := "load";
! J8 h! t/ d5 j% T$ V: A7 @- } GlobalDistObj := part.globDestination;
" Q( u$ N$ H! c Z assignLObj := rgmanager.rgAssignL;6 C8 |3 b5 O6 T0 J3 U0 V+ X
row := assignLObj.getRowNo(GlobalDistObj);- m7 _ }) o& |4 B
if Row = -1 then -- since 70
3 i0 ?$ k3 d+ u5 d6 a if lan=1 then
9 f! g: D* M& n: l( x2 A4 a3 f0 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( S1 d t- F7 n+ j( _1 v to_str("in der Andockstation: \"",?.~.name,"\""));. a, t, M( O+ V
else- a5 @ a# p4 j. Z" @5 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 N/ w) e" e& h0 K8 D7 D to_str("in docking station: \"",?.~.name,"\""));
x( v; C% o( Y$ V% v' ? end;
) V6 f9 a% F; c+ Q5 _2 S else' `9 @: {/ B0 @- }4 i0 o" q' ~8 C
@.Destination := assignLObj[1,row];8 `' P! L) Y- y m% O' V
end;
2 r/ A4 s+ r# _! g3 C newDirection(@);
! {& B( k, C: ^- ]8 r( O: `8 Z @.HasOrder := true;( ?' j; c5 X$ q3 a; Q, I; T/ [. H
end;
, O2 {) D, \9 ^/ o- Q end;
9 q5 i9 G: L2 p6 Qend; -- of the method
; K* @# @/ g$ o+ k* P( R |