/* called by: entrance ctrl of the object 'track'# X' u- y, @" H3 s* i
*/6 T* r8 [8 Z5 \- ?- ~# U8 e
is
* Q) S( j' K( p$ Z8 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, g" j5 e6 b2 U) `8 S- pdo8 s: f( y/ v; w3 I) O! G
Lan := rootfolder.Internal.Tools.AOLlanguage;
- G( I& d6 h' \% k if current = @.Destination -- else return
$ \4 D1 b. E4 P1 y" z" w9 G. G; p0 y then9 P8 S6 p! W1 l: m% r& I: \: W
@.Destination := void;
$ `8 d# i0 o h. d if @.occupied then
7 q/ J8 L* {, K# p5 F part := @.cont;
3 @5 c* I+ c5 p+ m: B H0 G @.transpOrder := void;
U) d( a0 d# X$ y. ?7 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. z& Y3 N% g% x( u @,root.eventcontroller.simTime);
7 h) O$ \7 B+ d @.HasOrder := false;
7 a4 a+ f7 M1 N* k6 S* i @.DrivingHome := true;1 `* |7 x' c0 Y) x' P+ v* s+ ~- Z
rgManager.tryToStartTransOrder;; a% a4 u/ @( m6 \" ?( j9 T* H
if @.Destination = void. }- a. K" s& V
then -- no transport order for vehicle @
" K" a W4 o. L! U @.Destination :=) r; X2 u6 q }9 p
rgManager.nearestFreeStation(@,track.~);* v# S/ g6 Q* S. q: O# H. C
newDirection(@);
, g% [$ b5 |9 F if @.Destination /= void then
0 ?1 l9 v/ D1 i, T6 C @.Destination.NumReservation :=9 \- {% U( t/ x/ w% m3 j4 _4 x
@.Destination.NumReservation + 1;
# F# o( [6 H: x, C0 \4 X end;9 s' A7 ^+ r" p: R0 {6 E
@.CurrIcon := "drivingHome";
) l% i, c& x) Q# a0 f$ } }" V @.DrivingHome := true;' O$ |3 t& D0 x0 f& O8 b4 _
end;& c' W$ \7 j5 z+ T* P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
}9 a7 I- r# ^ j) q! K8 c part := @.transpOrder;* M% b+ f1 v* r! y2 X
part.move(@);-- load part& t: }" B% q% w& V/ ]9 a) }
@.CurrIcon := "load";' Q5 Z% d' B9 h- d/ j; ]
GlobalDistObj := part.globDestination;) Y- Y% u) E. @
assignLObj := rgmanager.rgAssignL;; _, m1 w- M/ b: D8 Q- w
row := assignLObj.getRowNo(GlobalDistObj);$ |" `3 \# ^ F3 l
if Row = -1 then -- since 70
+ m' J$ }$ r2 N$ B if lan=1 then6 n! |, r5 x3 T: i$ c H c( x, T9 X: O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 v6 r, j9 m0 t- k( E9 N+ E0 I to_str("in der Andockstation: \"",?.~.name,"\""));$ ?5 n/ a" h& I
else
2 k! D4 K! s6 M3 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ?1 @1 C: G' V: ^5 T# d to_str("in docking station: \"",?.~.name,"\"")); * `7 k8 n3 E3 C. P* m
end;! ^) p `1 D' F! z5 w' u
else
. ~+ ?5 o: u9 e# O @.Destination := assignLObj[1,row];
! N1 B B6 L8 ^6 s# ?7 B1 L end;
a& m/ W- c( X' C* u8 X# M; D) h newDirection(@);+ z4 `/ Y+ b2 e3 A
@.HasOrder := true;
q5 _/ ?+ w; w3 d+ u1 L end;
/ O4 n# A# u) X7 j4 f end;
- b6 i! m& X; H/ v5 T. rend; -- of the method
; z. y, p9 N9 @2 U! X: r1 U9 C6 z |