/* called by: entrance ctrl of the object 'track'
" Q# G. V- U, C1 p+ P*/
6 S( B0 J+ _9 Y* b0 n; l% `is
; r( w" s# l. y' U! m, s# \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;* o# j. e S1 d' G; @1 d$ J# o _
do
4 E/ M, W: o+ @- o Lan := rootfolder.Internal.Tools.AOLlanguage;
: S7 y$ B6 L# g& X" K" C if current = @.Destination -- else return. j6 u' n |4 n
then: z8 F9 k$ T; W; ^0 v
@.Destination := void;
2 P2 \& a- K% W1 v7 q0 v7 `$ q if @.occupied then
7 z5 T5 I8 M' H- U part := @.cont;8 h! k; V! G# V1 }: D( @) l3 q
@.transpOrder := void;
- b( b4 O3 d, e1 D6 `1 \5 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 o' D# t' q8 s1 K" K6 h9 ?, N @,root.eventcontroller.simTime);) b# E' B& N3 w3 f" W) O3 K% \4 E, q
@.HasOrder := false;
$ Q, N& Q8 a/ h* b9 y) | @.DrivingHome := true;
0 S. R" H& `8 h) s5 [ rgManager.tryToStartTransOrder;
/ d& N5 v& v% t$ {. Z2 ?! a. w' ~ if @.Destination = void3 R" p1 F9 K* S" P" y
then -- no transport order for vehicle @
- r3 r# G& `1 B( |9 R& o- f" i @.Destination :=
! T, g3 N# r9 K rgManager.nearestFreeStation(@,track.~);
6 ~ ?. g8 n4 ^# J% D- X# ^ newDirection(@); ' }" i9 s& [. C8 o0 x* I/ y
if @.Destination /= void then" x/ Q* W- ?) f0 _* a+ `, s/ J
@.Destination.NumReservation :=
+ {( g2 f7 X0 o/ ` @.Destination.NumReservation + 1;1 V4 i* _) v& b2 |7 ~, j
end;
4 C- j# L2 E# g G @.CurrIcon := "drivingHome";
' V2 k3 q3 V5 F @.DrivingHome := true;9 s! q2 {& N7 c2 ^+ R- y
end;8 r3 L# c1 K7 }% s) `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) W0 i. B4 M! i part := @.transpOrder;
' n* k+ g- A& T/ s8 X* I part.move(@);-- load part4 q* J1 O, l& C+ h$ i
@.CurrIcon := "load";
, M9 N0 |/ B) _, `3 }1 }% F. e I1 U GlobalDistObj := part.globDestination;0 {) g$ `, c* U( U/ e
assignLObj := rgmanager.rgAssignL;
0 g0 ]2 I3 j6 D: d, T6 ^ row := assignLObj.getRowNo(GlobalDistObj);; _3 ~8 \8 T t; u% ?1 D# D% F
if Row = -1 then -- since 70: \% }7 q% G; r, e
if lan=1 then
4 q7 G5 \7 x% U( P; c" E$ V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ o, |! d/ U! C& n* P; a
to_str("in der Andockstation: \"",?.~.name,"\""));
- ^# b& ?3 ~" S1 O1 B; \% l else
* I5 @0 M2 P6 I/ Q/ P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ g* n- ?1 c, g5 j# b to_str("in docking station: \"",?.~.name,"\""));
. L# `# D: b, {# V$ X0 ^ end;8 P+ H% N! q8 k
else; a2 J. v% z0 a' _/ B
@.Destination := assignLObj[1,row];; Q. R$ [. a+ b- t. u$ S
end;
0 D- Z$ Z* v9 u5 Y& T newDirection(@);6 C. p! W" K3 m9 N) p- ?
@.HasOrder := true;
) [6 ~% i o2 f! x) \7 p0 ~ end;
; g9 M! C3 S6 x+ q end;
- @3 N% p' }; ~( J, \: Y7 P; pend; -- of the method
. v2 B* p8 [5 e |