/* called by: entrance ctrl of the object 'track'
# A: K. A) D; P+ e*/
5 n1 v; c) S% j' [is
/ H+ J+ I$ q8 [5 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' h; {& k5 r2 x7 z) sdo! S, l: P" j$ @: o9 A* y% r
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 q9 Y! v+ b4 f) L if current = @.Destination -- else return: h6 d& i: J9 t9 _* |; H
then3 G4 ~) W8 i1 @5 }9 q* F. k6 U
@.Destination := void;
! ] Q% ~: ?& {! t if @.occupied then
8 x, ^" ~ x# m: U: o part := @.cont;- t: Y- E8 h! i) [, b# A* f
@.transpOrder := void;
3 z J( Y1 P/ h6 f5 { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# a% ^0 `. x8 ~# G+ e! L% f4 y# d) {
@,root.eventcontroller.simTime);
$ o# r: V/ e& ?# b* b3 ?* ]: I0 `- ]1 K @.HasOrder := false;
# u0 C" M( a1 {9 L @.DrivingHome := true;- a# }/ Z- ~1 ~! n6 @
rgManager.tryToStartTransOrder;
9 M& j: b% P$ U0 K0 a; K if @.Destination = void
0 ^% n7 p/ E6 z1 u then -- no transport order for vehicle @
# _$ n3 R! o0 c0 s: B @.Destination :=; L! B/ A" r; ^: Y/ p% R) f
rgManager.nearestFreeStation(@,track.~);1 k4 i3 j- B, |
newDirection(@); 7 e7 e3 e. E% R1 E% b
if @.Destination /= void then
9 b* O" F6 E( \. g3 e6 [7 ^/ O6 C, t @.Destination.NumReservation :=
8 l, h7 g/ d- e' O5 y @.Destination.NumReservation + 1;
. }( F' [, D! ] end;% C/ }! ?) {5 _2 t' V
@.CurrIcon := "drivingHome";/ H6 c; U/ E" i' q* |: t
@.DrivingHome := true;
5 F2 c/ P# x1 d; X# W, f& X end;4 e' @. @. A. u# q7 H, ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ O0 d4 g9 R; m5 y+ x/ U4 M part := @.transpOrder;: G) G" P/ W8 G
part.move(@);-- load part: q; o- G! j$ i7 T, `
@.CurrIcon := "load";
: L4 K) H% X; n4 E: Z" g6 h0 z GlobalDistObj := part.globDestination;8 i& ~- Y' o0 o6 c3 J
assignLObj := rgmanager.rgAssignL;* u& Y" ]& i" k) E0 @; V* X: A
row := assignLObj.getRowNo(GlobalDistObj);
6 ~! t i* B U- Y& } if Row = -1 then -- since 700 Q4 d; |: A5 g: ~8 G$ g
if lan=1 then
0 M& A$ N& G# x; U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, B, _; @! V4 K( o
to_str("in der Andockstation: \"",?.~.name,"\""));
) s; q! ^& c' ?7 K' ~6 @- d3 |1 |. I else' e5 q; N4 w8 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) f7 O1 D' O- l5 p5 b to_str("in docking station: \"",?.~.name,"\"")); 2 E2 g! W8 A, f8 w7 ?, e9 s" o+ V6 |
end;. E3 x0 r6 Y+ ^0 O1 d2 Z7 O8 ^
else: n. |$ \8 a8 l; J y9 y
@.Destination := assignLObj[1,row];# l0 |! P Z- |3 O6 B; n2 l2 f
end; - C* @4 u7 \" ~! [" {4 v. g( \/ n
newDirection(@);
) f( A4 T/ q$ t# Q/ W @.HasOrder := true;3 B% q. P. J# N7 m$ |
end;
6 h5 Q0 S9 U, _% ?3 O end;0 U. S% {1 n0 F& ^1 g
end; -- of the method
% T! P, Y n8 ~0 z: D |