/* called by: entrance ctrl of the object 'track'
, x) C' ?8 u7 d- T5 d, ]*/
+ w9 _+ k' J6 S# F' M: ois1 k- ^# E" a/ V% f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 Y( u! o, u/ t9 _do7 I: T1 _8 W8 p; t4 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ Q0 m# R, {& }$ x if current = @.Destination -- else return8 n- B6 {* t. l. m; ^* l' p' ?
then3 ^/ I/ j- e& s" e& D
@.Destination := void;
3 z$ }$ O! M( \; v0 D if @.occupied then
7 E, K4 a- B2 Y$ L- C: D part := @.cont;6 ~( h# R2 E6 C' W
@.transpOrder := void;0 z- p9 H& @* c5 C8 j9 T4 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 J+ O+ l! B8 ] E5 f% @
@,root.eventcontroller.simTime);
2 b3 \- K9 C I/ {: ~: o, E @.HasOrder := false;
1 Q5 {: H& ~8 ]/ j1 P, M* G/ o7 q @.DrivingHome := true;. O6 a1 m& [, x H
rgManager.tryToStartTransOrder;6 g2 {& L4 g% k" n
if @.Destination = void9 q* x- T8 Q& j9 ~7 }6 u
then -- no transport order for vehicle @
Y* y/ B' Q6 }, m4 C/ _& _2 J @.Destination :=
% A) p2 ?9 Q6 T" Y1 {, {% P( t rgManager.nearestFreeStation(@,track.~);
) @4 d( v% w! K! E! V) P' S5 ~ D newDirection(@); 2 h$ P6 Y& {; C E. ~
if @.Destination /= void then
" z2 T5 N8 X3 F" g @.Destination.NumReservation :=
" G8 c. y4 F( O! V; ^ @.Destination.NumReservation + 1;
+ Q+ C8 u9 \2 t# c6 y Z; j end;$ Q1 Y, ]9 W, z2 v
@.CurrIcon := "drivingHome";
- j4 L5 g5 v! d3 e) O @.DrivingHome := true;- b9 G! I1 P( z$ v, }/ k$ V
end;
2 Y7 a- C3 C5 t+ s- \6 \( F2 M4 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station# |/ u4 y7 p, O! d
part := @.transpOrder;
( R! }% @+ Z" F part.move(@);-- load part$ j% c% `0 B5 I1 m% f% O
@.CurrIcon := "load";
& u7 t5 p. x) m7 F, D5 H GlobalDistObj := part.globDestination;
' V4 Y- N+ i7 H4 R assignLObj := rgmanager.rgAssignL;
7 [" f; l" P# ^0 w: x row := assignLObj.getRowNo(GlobalDistObj);7 O5 I! V! S. T9 \. g
if Row = -1 then -- since 70
* Q" P: e, p! S& o if lan=1 then$ X( C/ P! E* k ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: y+ k$ r+ l h0 C5 o5 | to_str("in der Andockstation: \"",?.~.name,"\""));( W, K- x P+ |3 v" Q6 s( i5 c9 F
else
! \9 ? d5 G2 N# n- b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 Z. b4 `6 k3 V# ?) b5 x; N% G
to_str("in docking station: \"",?.~.name,"\""));
4 k8 C9 I. s$ B! E( o3 F end;
4 w; f. J' T" X5 {! h7 L0 u$ d else
# C# o M' g8 e% k @.Destination := assignLObj[1,row];
7 w7 D" V* J' Q2 M end;
3 [; m* Q5 K$ Z! b4 Y newDirection(@);
g0 Z. x1 o% e, I& v @.HasOrder := true;
! [: z6 C( |) h# w end;" q- i3 u9 X Q$ m8 r
end;4 V) H3 p, }+ o2 b
end; -- of the method& F8 A7 _; R; t: R- ?
|