/* called by: entrance ctrl of the object 'track'
' ?; ?2 s; Y+ |6 S1 }4 d*/
7 i. w! V0 E0 `7 y& mis
' ]' i" [2 b( Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& Y) U+ A& a2 E7 f, Y$ Y8 C; P, [+ Fdo: t7 F$ T" q0 a! j/ g# H/ X
Lan := rootfolder.Internal.Tools.AOLlanguage;1 A( ^( H9 K7 v: k+ f, s) X
if current = @.Destination -- else return
" d# F- R& r' h then
# B5 b- D( k# i4 O1 C @.Destination := void;
7 a2 c' C- o0 `8 A5 s- e$ g7 o) E if @.occupied then
6 f7 |% h; |8 ~/ e1 x% k0 d part := @.cont;7 e: I0 Y/ Y$ k% M
@.transpOrder := void;
2 h( r4 C; z+ T$ Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! B* ~0 [9 G$ W5 x' }3 U/ @
@,root.eventcontroller.simTime);
z( l0 h& J+ {; c& N- L1 ]: @ Y @.HasOrder := false;
' L0 J! }" b4 Q8 k# J8 j @.DrivingHome := true;" p) s1 E! B( A+ f c/ o
rgManager.tryToStartTransOrder;
4 J) I# v/ i- ]* a* c! \' A* C if @.Destination = void* }; T6 a1 l* O
then -- no transport order for vehicle @9 w3 b5 Y) [2 G3 o; u" }) l
@.Destination :=7 I: Q, }$ G9 X$ C0 q% F
rgManager.nearestFreeStation(@,track.~);) R5 ?* t2 T; W+ O6 T7 d1 T
newDirection(@);
" e, T4 i4 v6 G1 C# Q if @.Destination /= void then
# u1 U5 I8 k' s, r7 e @.Destination.NumReservation :=
- ~6 a; E9 Y# ]8 p: ` @.Destination.NumReservation + 1;
/ L! f% v5 w+ ^2 @& A end;3 b, Q1 R, J; T4 [
@.CurrIcon := "drivingHome";* E( A# X5 c& m5 S' P% G
@.DrivingHome := true;
3 ~3 w6 r8 e6 `0 j end;
, n& J5 s; V8 z5 w& s; P4 E! t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 m) K: C/ H; M5 F$ e3 v4 B- q part := @.transpOrder;
1 Z2 o Z/ d7 C. p. R) T8 t part.move(@);-- load part4 k& z7 z5 M2 C
@.CurrIcon := "load";% L' i3 O9 u$ A
GlobalDistObj := part.globDestination;& W! g$ ^5 K+ l& m
assignLObj := rgmanager.rgAssignL;
; r: o8 m! ?# {" ~4 C/ W row := assignLObj.getRowNo(GlobalDistObj); Z/ X- ]0 s' i% ~" \$ I$ V
if Row = -1 then -- since 70$ Y5 G8 x7 Z' W7 \/ ?
if lan=1 then
/ P- j$ B- v1 T n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ?2 x, A# A) ]: Q1 I6 R to_str("in der Andockstation: \"",?.~.name,"\""));
3 ?+ D& S; d; T# Z p% x else
% p" k* c" p6 q# D5 n$ N- m- U9 N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% V6 h7 O0 j; ?
to_str("in docking station: \"",?.~.name,"\"")); 7 l8 n9 p& X( Z) S. m% K( F
end;
( t: X# u: q: w+ b% \' I T p' @ else
. S5 K$ N8 e& \; s @.Destination := assignLObj[1,row];
' g7 Q5 ^! {$ @; h. L+ a end;
! F+ {+ C( g; A1 E( A2 | newDirection(@);1 Y( v, B( w* ~+ D* {5 M
@.HasOrder := true;# {. F. c! ` f- D" J1 {! l
end;
. _/ {9 j7 d2 y& {! q4 U% | end;
" U0 Q$ B& k$ R2 bend; -- of the method" c" [ [" G% M! K
|