/* called by: entrance ctrl of the object 'track'7 T2 P5 F0 n- N& C8 N
*/
% E3 [0 l! T2 o/ q7 ^& J* pis
5 @! n8 x" q) G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ q$ Y: V9 f6 ^& M6 Y pdo. r5 f% ^% O0 d. w8 Z- k/ Q3 o# z
Lan := rootfolder.Internal.Tools.AOLlanguage;
& h) |3 `# X' p; J5 p% b2 O: Q% u if current = @.Destination -- else return
* h& D6 T6 V7 G" I then
; E' x8 V9 C5 j0 _ @.Destination := void;
0 E7 y, C$ i8 w, _9 c/ p# @1 n if @.occupied then
* h# b3 s8 ]; |6 e$ m# V) j E part := @.cont;
7 x3 E' L' O7 C" N @.transpOrder := void;
3 t6 c$ I( [/ b1 k3 _, R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# q4 O/ n% e1 y* r' h8 g
@,root.eventcontroller.simTime);6 F8 S4 f4 V1 ]: F! Y
@.HasOrder := false;- z; s) S" |( l: s) M
@.DrivingHome := true;
8 y, ?& j. p! P5 S+ B rgManager.tryToStartTransOrder;0 n6 d/ z; O$ } Q0 Q% I& C
if @.Destination = void9 Z' q$ l8 |- [
then -- no transport order for vehicle @" h- N* S! C+ q8 w; B/ M
@.Destination :=7 x: ?6 D* [& k/ N3 \9 z7 \1 r" F! }6 H
rgManager.nearestFreeStation(@,track.~);
9 y% m c" G& F0 f' ~ newDirection(@);
2 J* X! R- p3 c2 ~: B6 b if @.Destination /= void then* w1 Q9 ^9 V& V4 h7 Y
@.Destination.NumReservation :=/ F2 ^% [5 f& O# \- ]( h
@.Destination.NumReservation + 1;! n o# U0 v3 A0 X; q/ R4 I9 C! c
end;
( `- n: }8 |* O; S @.CurrIcon := "drivingHome";
, Z, k! k1 L3 H; \: _ @.DrivingHome := true;5 I! o, f# N. y2 Z- i4 [+ p, ?- G
end;) C- S/ o, i, D7 b5 I& G3 d4 G7 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ N- K1 i. D5 y2 H& {3 f
part := @.transpOrder;
7 t% r) U' g8 |7 C- `$ w part.move(@);-- load part
- l/ a* Q6 O d( c @.CurrIcon := "load";6 O+ V n U5 |: _& \& E/ ~! Y3 h
GlobalDistObj := part.globDestination;
% d8 t0 A/ j7 F* S assignLObj := rgmanager.rgAssignL;% t2 e- j. X' b
row := assignLObj.getRowNo(GlobalDistObj);
5 ^7 B2 P8 i! A6 R/ d0 e# S if Row = -1 then -- since 70
: C# f8 [8 ~- w v0 \ if lan=1 then
6 k9 l8 R" M }0 `# K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& K0 R. M( {% S8 t4 [( Q
to_str("in der Andockstation: \"",?.~.name,"\""));# ~7 L. q* Y* z) \% b/ v* x0 ^ F
else
8 K8 Q) f4 o! Q! ?/ Z: P2 }- { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
G- N0 i `' k" g* n* p to_str("in docking station: \"",?.~.name,"\""));
9 ?9 j c$ x2 A end;
: J% J. @% n( e& A- O else: L$ t4 A* W; u2 n% q d
@.Destination := assignLObj[1,row];2 V! b* |2 W2 s, B- o7 P1 P
end; # l* O; G2 ~8 F5 }0 H
newDirection(@);) a5 w, M) C, |8 g* m+ M0 r
@.HasOrder := true;, w. {1 o' ~! s9 J! s7 {6 Y
end;
! k( v6 |$ I7 ^( S9 F+ G4 K: W end;& T" l# W/ H: l/ t# H. ^
end; -- of the method& U1 K: j" l7 Z, [ \" m
|