/* called by: entrance ctrl of the object 'track'
+ ~% H) D; S; a) A; v' }*/( G, Q; M) M8 T4 L
is" Y4 ~' |0 C: U" c5 Z6 T5 V- S1 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! [7 D5 S/ U( j& o2 |7 E4 y7 V3 g
do- V1 e# k! g& h% P5 L
Lan := rootfolder.Internal.Tools.AOLlanguage;
! V+ P d% O) l/ c; A+ H! \- ? if current = @.Destination -- else return9 h: E. Y* o* ?0 S; p( s
then
7 k- x6 I1 l" c. i7 d. i @.Destination := void;
4 h' e! O3 L2 j! n if @.occupied then
4 h* L1 T3 j) W9 }& [ part := @.cont;
+ E: ~) b5 g5 l! R0 ^ @.transpOrder := void;% F' v" R( J* L4 y+ [/ Y/ t$ F0 @+ d8 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% L/ \* I" n0 B$ i% {# I% n @,root.eventcontroller.simTime);$ Q% `* v* G* w6 e0 X& X( b3 E5 R
@.HasOrder := false; o) D; Z4 R- i. { ]: k6 ^1 f- A
@.DrivingHome := true;
& p& D; {7 ^$ E; w6 T2 ~ rgManager.tryToStartTransOrder;
2 ^6 X& g9 [- _( d3 Y+ O if @.Destination = void9 V7 G R3 f: [8 t; O5 N* D% d
then -- no transport order for vehicle @
( D$ U! a3 \9 M. I! ^9 g @.Destination :=
+ ^5 y7 R5 L. |9 D( U rgManager.nearestFreeStation(@,track.~);5 X7 c9 R( e$ s
newDirection(@);
: Y: T7 m& d8 q- O' ~ if @.Destination /= void then
7 L, S* w6 w3 s7 K @.Destination.NumReservation := s( B9 h) Z0 E' v8 f3 A2 \
@.Destination.NumReservation + 1;% Q! h A) k" {8 z4 r& P
end;
y V, k; ?3 n3 w4 v @.CurrIcon := "drivingHome";
- O3 z* q4 c1 ~ @.DrivingHome := true;, P. `: s2 }% n5 t3 v- w+ ?6 V
end;
- I* q6 L/ B8 l! f9 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 L0 m* C. e3 w0 ?
part := @.transpOrder;
8 ~" R2 \$ N q part.move(@);-- load part( M4 F I' N6 A. b$ B5 F* b( a1 Q
@.CurrIcon := "load";
& E. z5 ?2 d6 L# J7 d2 w GlobalDistObj := part.globDestination;
! c' a1 E7 T7 q$ |! ]; I# L assignLObj := rgmanager.rgAssignL;
, Y; z2 m2 Y6 c/ x r row := assignLObj.getRowNo(GlobalDistObj);
) I& Z4 W2 `) c/ s6 U7 [, j. |1 b g if Row = -1 then -- since 70
% m/ }( j; C! W# g% M if lan=1 then3 A7 f5 X% f& @. e" [" h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% H# \0 r4 Q# N, T- ?
to_str("in der Andockstation: \"",?.~.name,"\""));$ @. t4 V% l' ~6 O3 s% ~% t
else ]% c0 R+ g, J v0 D: H+ n \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
K: Y- j& Z) Y! [8 S' u: Z to_str("in docking station: \"",?.~.name,"\"")); " o5 a/ }( j8 p! C. |; K9 }
end;! ~1 T/ A! B3 C
else
9 L o* o0 k! M7 L0 {- m9 E" z: R" j1 {2 F @.Destination := assignLObj[1,row];
; i. y/ |* y) Z! w+ u end;
8 X0 V" ~+ ~) ]/ V- ]. z n newDirection(@);
0 A. i. b8 M2 ]" b$ d0 D @.HasOrder := true;
! y1 t! k# m7 f; I4 E( [ end;
" q" `4 h6 Y0 l c" _" U7 T+ ` end;' d" Y1 j1 r5 h. F- B9 u
end; -- of the method
1 y7 c/ c% ?2 s0 v( ~4 ~ |