/* called by: entrance ctrl of the object 'track'
8 F% I1 u: t \* J*/
2 m( E; X! C0 ]: `is& d; n8 O# Z- `! ]* u: ~' x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 ] U2 y7 y) j! t: d# @, W4 O
do" X0 }7 u; p+ H6 {6 Q' a
Lan := rootfolder.Internal.Tools.AOLlanguage;$ p4 r2 B& g7 k7 g
if current = @.Destination -- else return! O; B+ b: X6 z' x
then R$ I$ o' R* E; J( J
@.Destination := void;
; L2 G L. p T' [, m" U if @.occupied then
7 W1 O' ]( ^# U5 w$ @9 } part := @.cont;
& H5 j! T" l% H* e/ z- | @.transpOrder := void;
, L8 W' ^5 E \+ H& {9 s: H- N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! X- t1 r2 }$ I1 l0 X- P+ B/ b& b
@,root.eventcontroller.simTime);' u, B z( x9 n# S( c# A
@.HasOrder := false;
3 i( E5 ?$ p2 r8 b @.DrivingHome := true;# ?1 y# ?' Y1 o1 `& t6 }
rgManager.tryToStartTransOrder;
5 f+ X U8 ^6 L2 \' F. A( b if @.Destination = void/ G b% p; I3 K4 t
then -- no transport order for vehicle @
: D1 _* L* a; M4 C/ } @.Destination :=
9 w4 `+ H7 A6 w) q1 I4 j rgManager.nearestFreeStation(@,track.~);7 n* k: e+ Y* G B
newDirection(@);
R, Z* p8 c# [) R, S$ O) F8 e/ b if @.Destination /= void then
. ]$ C% f+ j$ ^ @.Destination.NumReservation :=
- g" i5 G H2 Z: J6 J! @4 Q @.Destination.NumReservation + 1;
- b- {$ T6 B" G7 f3 E- h' S end;
+ A7 ]; F3 L. P1 D2 e- _9 { @.CurrIcon := "drivingHome";8 Q- Y- d, D" D3 x$ `- Y
@.DrivingHome := true;
. T, H- ^) Q4 Q! Z6 t! X+ E end;
' {/ X1 ]6 z6 m' [+ \; K else -- the vehicle @ is empty, both vehicle and part are in the same dock station \" }2 O( \8 n, H" U' z
part := @.transpOrder;
' o4 ~* g! c+ Y" i% Y/ e) N. F# ^( W2 t part.move(@);-- load part
: ? v: C6 `- k$ M @.CurrIcon := "load";; _2 d* o. b2 _
GlobalDistObj := part.globDestination;
R8 S5 T- v0 [3 g assignLObj := rgmanager.rgAssignL;
8 {- J0 M" m* z row := assignLObj.getRowNo(GlobalDistObj);. A- ]" H" Y- f" U$ Y1 Z& I
if Row = -1 then -- since 70' _+ f1 a! j8 K- Y
if lan=1 then1 K( Y4 s: Q/ l; R; y# X0 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; b' n( ^% U0 C* C" B4 r! y
to_str("in der Andockstation: \"",?.~.name,"\""));
" w4 b+ D. q7 v# G else2 H G! l7 e' K G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& X- O' Q# K* I8 Y
to_str("in docking station: \"",?.~.name,"\""));
2 e; a3 B: S6 N+ \3 N0 a" F3 z) y end;
9 Q0 I3 p& P& Q$ {. x; a else
3 ]9 e- R+ I1 \( d+ k% d0 D @.Destination := assignLObj[1,row];
0 k- ]' J- H- i* n7 T! t$ m end;
6 O- o2 M' \: }* {' q3 [ newDirection(@);3 s3 m# P7 c9 X2 A- m
@.HasOrder := true;
7 M3 d/ a' p% d# }% H end;
6 }6 [* G) y& e9 L4 a, [ end;$ t" k' F. U4 k' U
end; -- of the method
* c/ j' \8 m/ u |