/* called by: entrance ctrl of the object 'track'+ n0 M6 ]6 I, V: P8 |) G% _% U6 ?
*/
) d! R K/ C7 m6 Vis
# j4 ^8 X; O# W6 H& z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 K% p3 F8 a% ddo# V, a, ?" i1 W" B2 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ S3 W* _- h1 t$ w# K if current = @.Destination -- else return
R# \. @' ~! T5 S5 q then
) \% `# ?2 i' H; y @.Destination := void;
/ B9 M) N2 p$ Q$ B" a8 C6 T' w if @.occupied then
* o: x7 c; _8 U9 J) Y part := @.cont;
, K! D) x4 C0 c* u0 W- C @.transpOrder := void;
) X0 e, J3 A! L) I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 F- p( z: m* h5 t" I2 R @,root.eventcontroller.simTime); b' N4 K0 @: Z* h7 q9 s1 b
@.HasOrder := false;
3 \+ F# t0 U, L1 S2 ] @.DrivingHome := true;' s2 Z4 J& Z% H3 C% J
rgManager.tryToStartTransOrder;# }2 Y& \' ]; {( q1 }' y0 ?1 m' I
if @.Destination = void- A0 I3 a: y& @( l
then -- no transport order for vehicle @
7 T5 ~& Z( Y6 s) o" ?) z @.Destination :=
6 z) F7 q! M, W rgManager.nearestFreeStation(@,track.~);6 l( z7 C( h6 l5 O" X' ^
newDirection(@);
2 b7 q( \" i2 f9 E6 H# r if @.Destination /= void then" X$ K* C3 Y6 T7 O# e
@.Destination.NumReservation :=' k' @0 }1 l; y2 b
@.Destination.NumReservation + 1;
3 \- h8 D7 X2 }3 b4 a- w end;
3 l8 A. Z3 A1 H9 }4 r# }$ Q4 {( J. L @.CurrIcon := "drivingHome";) u6 i2 _6 k7 ?+ B. Z0 i
@.DrivingHome := true;
8 Q @# g/ N: |+ j6 i/ O/ Z end;- T m1 p9 Z8 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 t8 X% d, i& C+ P, O# D: e part := @.transpOrder;, ?6 Y3 H5 o9 W
part.move(@);-- load part
% S$ }1 C8 ~/ { @.CurrIcon := "load";5 q$ f# t+ n& l) |' r7 Y* `# P
GlobalDistObj := part.globDestination;
2 f% k# S. ?3 q+ k( K7 u# f: Z assignLObj := rgmanager.rgAssignL;
" d Z* V, s/ x! s row := assignLObj.getRowNo(GlobalDistObj);9 N. y) y" t0 f# F# M7 P# _: ^/ i
if Row = -1 then -- since 70" X5 G1 k H8 m3 ?* A" x% ~
if lan=1 then
* G( `: e- i2 I* Z+ h1 j: x, @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% v5 r' w% @% w1 g5 D to_str("in der Andockstation: \"",?.~.name,"\""));) E; n7 I6 b4 H3 X2 T
else8 J5 D. V/ H" Q1 w' b# u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' [0 N3 B! v9 y! l5 Q: r to_str("in docking station: \"",?.~.name,"\"")); 6 A8 J0 q/ q4 i1 s1 E
end;5 o9 o; w2 L1 l S
else
; M7 }7 U- c) A# V/ J @.Destination := assignLObj[1,row];
: |$ V4 M0 J) c- X end;
) p! L5 H. w5 X& L' I newDirection(@);
9 k6 k: M9 y+ Q2 ? v @.HasOrder := true;- X# y, F+ R% p2 i) r7 C
end;6 X" o$ m0 I G8 n" }* j
end;
9 [& o9 \% h1 O, `end; -- of the method- H- x9 ~' k0 G& P) ^" T
|