/* called by: entrance ctrl of the object 'track'
- {4 p5 v0 k- S, ?, O' E, O$ D*/' }% U! f+ [- o3 [$ {" F( q
is( Y( d( s/ c+ {% \ e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) ^7 d* s2 C% g8 ~- d6 i
do
j4 t0 v# a7 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
! E( m# M) k8 s! W/ D x if current = @.Destination -- else return4 ]3 a' R( d7 f
then. L' C+ e4 U. E+ q; x9 Y
@.Destination := void;
0 t# F' {, N9 X0 \ if @.occupied then
" ~" \% a% h6 X) ]5 [- C part := @.cont;
% z8 }' l: `) o4 B0 H% U @.transpOrder := void;
2 T, `% W. r: u2 |3 e+ i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' V3 `, `& {! X4 s. b" } @,root.eventcontroller.simTime);: X& x' e& j! y3 |7 |
@.HasOrder := false;
3 d: ^% V ~* E" g @.DrivingHome := true;
( W+ T* ]: } X6 a7 T2 e& {/ p rgManager.tryToStartTransOrder;
7 A0 k, C: {8 a4 F if @.Destination = void4 S& O% w, N @0 h* i% ?$ J
then -- no transport order for vehicle @
- Q P* l3 D2 s @.Destination :=4 d w' @0 p& F9 K1 Z& T$ T; K" X
rgManager.nearestFreeStation(@,track.~);; \ ]8 m. H3 u/ E: D) T
newDirection(@);
* l9 T1 f2 w- G3 [8 j9 N. o- e$ U if @.Destination /= void then! V. \' S" n- s
@.Destination.NumReservation :=( P0 q. `" |: A5 s, _5 L5 m4 f
@.Destination.NumReservation + 1;
4 O! A3 w0 A9 m) y5 S8 j7 K8 { end;
2 T6 T" F9 J" D8 z4 f: z! q0 o @.CurrIcon := "drivingHome";
0 R# T% S5 n. Z- E, v x* D0 | @.DrivingHome := true;
7 A3 f) {/ F( k end;5 f' C' V, ]; D, P3 T" ~ h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# }& _1 L( ~& |+ k' E! c
part := @.transpOrder;* p, `4 @/ W* }, Q& Z0 {
part.move(@);-- load part! r; {9 Y& f1 l% `( K+ u
@.CurrIcon := "load";
4 u( T' w5 \3 k! w8 a GlobalDistObj := part.globDestination;
; U Q3 J: d. ~; R8 l assignLObj := rgmanager.rgAssignL;
+ S. C* S# R0 ^4 H1 w* M row := assignLObj.getRowNo(GlobalDistObj);
4 J2 R& n9 m; P if Row = -1 then -- since 70! p. b( U, [+ X1 {: V" H2 Q4 O ]
if lan=1 then1 y. l1 {* ~+ g1 @% M. k/ [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' q0 o, p9 }/ x/ o8 y; A. |3 e: F
to_str("in der Andockstation: \"",?.~.name,"\""));# e( `7 R; b: }1 B+ R( }
else; o* o2 b$ j$ O- z3 `* P# J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 O' @' b( u1 F) f5 s# H
to_str("in docking station: \"",?.~.name,"\"")); . A. M- `. h! F! _- U7 G" X
end;7 I2 h/ L Z9 F; ~; k q4 u3 ^
else% Y: w4 v$ U* C: J+ E( \
@.Destination := assignLObj[1,row];" ]* _& ^8 h/ ?' k
end; 0 k0 e* D( N6 _3 l, W" _+ K
newDirection(@);
) [" j$ ^$ U/ H k- K @.HasOrder := true;: Q- K* Y. s8 n2 u! u+ r" ?
end;
4 m' p1 N1 [! A$ d6 _6 X0 P end;' H+ X6 F# w# r* o/ a
end; -- of the method
, i/ k/ U# E7 w0 F5 u* p |