/* called by: entrance ctrl of the object 'track'9 f: }% t8 o/ l/ r
*/
! x4 |! s' {& g, V4 v: k+ tis7 S" d' l4 @7 Y" F q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) W a1 S, Z H# N5 k
do
# ]3 x# J6 q5 e- \3 C Lan := rootfolder.Internal.Tools.AOLlanguage;8 [5 N6 C8 Z! K5 O* W: O
if current = @.Destination -- else return
1 I. W, W: z: ^8 Y then
0 A% o$ v8 w0 r0 r @.Destination := void;( e; n. A+ T6 H
if @.occupied then9 [! o7 `* Z* W |' T7 R
part := @.cont;9 m- F( _+ K$ i- y8 k
@.transpOrder := void;
3 W+ S3 y1 [0 b' y( C* ?2 |7 G8 X/ V2 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# n9 `8 m1 X8 O. k
@,root.eventcontroller.simTime);
4 k( t- g. |* v, R. u4 s2 S @.HasOrder := false;5 P6 V7 o2 f @9 I, ?7 N! {& @7 n
@.DrivingHome := true;
% y8 }% T& J" f! P% D: L" j rgManager.tryToStartTransOrder;; p1 s1 u# W$ ?0 P
if @.Destination = void
+ F$ w0 R) g* f/ \" n! l. E/ t then -- no transport order for vehicle @" A, c* `; P& y" Z0 n1 K3 Q. N0 R4 j
@.Destination :=
& k) s9 P, b/ M4 v rgManager.nearestFreeStation(@,track.~);
- `3 u8 U4 r1 }( U% l! u0 p newDirection(@); & o* @# {/ F: s% y- `& y
if @.Destination /= void then8 ?; `( U! D9 D e. N h" |. G0 \
@.Destination.NumReservation :=
& J2 x7 o4 c: X @.Destination.NumReservation + 1;- C8 r3 m: M* X
end;
8 ~( a. S7 T5 G$ v- e+ L$ Y% W @.CurrIcon := "drivingHome";
# x$ l1 S5 L: K* X7 e @.DrivingHome := true;, z) C# m% Q% a& ^8 w4 u
end;
* n) o3 U" F; r1 Y5 m( ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& ]; N3 R, u2 f6 a" b" Z* `# L part := @.transpOrder;6 r, }9 V1 W3 f0 d1 K' N! _
part.move(@);-- load part9 w0 m% E6 k+ A$ k7 E( ?2 M- r! m2 K
@.CurrIcon := "load";
4 O3 \% D# z; T0 f1 j0 h; ? c GlobalDistObj := part.globDestination;
) z9 i* z* F1 W2 L assignLObj := rgmanager.rgAssignL;
" g1 k6 D1 F' m4 T( y- S6 K row := assignLObj.getRowNo(GlobalDistObj);* p# h" k2 P+ P% t
if Row = -1 then -- since 70 d: s. d' x0 P. m$ S7 }. @
if lan=1 then7 A% {6 K7 f8 L# ]7 M& F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, \# G: K1 W& q5 s: O g. O to_str("in der Andockstation: \"",?.~.name,"\""));
! G& i$ S) g4 \+ i4 k* j else9 i4 W5 ^9 G- }3 t2 U; X3 ]) ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% l+ k! _' I8 k( P- E e
to_str("in docking station: \"",?.~.name,"\"")); % K9 O C- D5 l4 v+ h; E
end;
8 C7 |0 H, y y. ?* ]( G. `0 T5 l else4 p: {) @* Y2 K7 D9 ^
@.Destination := assignLObj[1,row];
y5 n' c, o2 ]9 Y5 Y/ s end; $ Z" d4 H& `3 B! i9 _! [
newDirection(@);
. ]0 \" x8 c: B1 V4 j D# Q @.HasOrder := true;0 z- N8 T$ L, ~! z3 C6 z
end;
2 o0 P% l, W( G; h4 { end;
3 v) S4 @7 J9 z, F9 jend; -- of the method
: a: x1 c% ?$ w |