/* called by: entrance ctrl of the object 'track'
4 ?6 i7 M* r9 t9 Y7 I9 F; E*/% n/ V$ ^# U9 I) y ~) i; P6 `/ ~
is( ~5 x1 h/ y$ u( c! J! O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% [# x; i5 C N# x2 f- u" ?6 n4 J
do
; N- v! J. P/ |% f8 k# ~' ? Lan := rootfolder.Internal.Tools.AOLlanguage;
# ^+ n& l: A7 G1 d if current = @.Destination -- else return
. A. I8 C% o6 ]3 v then
) D* H0 A8 w' w% V$ U) R; Y" Y8 } @.Destination := void;( x. r& b- x2 S8 u
if @.occupied then
- W7 `& U! C" n' _8 u part := @.cont;# e1 O) b0 {6 A
@.transpOrder := void;% i4 P( F+ b' G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ m. w2 L1 Q4 A4 I% P
@,root.eventcontroller.simTime);
4 g5 O+ K2 Z# z, Y @.HasOrder := false;
$ S% h5 c. }# h4 ^% w: [ @.DrivingHome := true;5 o( y& c! N) ?2 c
rgManager.tryToStartTransOrder;
+ _1 V9 x) L* ?7 @ if @.Destination = void
. G( |* z: r3 u% I then -- no transport order for vehicle @5 d2 I* e) r, j2 e# @3 V9 o$ A" [
@.Destination :=
8 X" z- ], A! q u" W) b) P rgManager.nearestFreeStation(@,track.~);6 D4 W0 d9 L: a" l- j6 e8 `
newDirection(@);
! [# }: p6 x0 J) C if @.Destination /= void then: Z+ ^3 r% s& y# J
@.Destination.NumReservation :=
+ i$ J6 a3 g- S H- }% `! v @.Destination.NumReservation + 1;% N' u% a$ P# x! w3 d
end;9 x1 G- c, c. i) ~1 V2 \
@.CurrIcon := "drivingHome";
/ L* n# p8 I7 u$ Q' ~. o8 X @.DrivingHome := true;
0 ]9 g! k3 U3 E7 K* n6 [# ~ end;
& K( u9 \! B: H v else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 L' B- N ?8 M
part := @.transpOrder; w5 c: j4 p5 v7 P7 e+ G! K
part.move(@);-- load part
6 G/ e) h( M$ H: G- T @.CurrIcon := "load";
8 S$ T% o2 B, w. u GlobalDistObj := part.globDestination;. c3 F9 v0 _) @
assignLObj := rgmanager.rgAssignL;8 j, ?& e) s- G0 D
row := assignLObj.getRowNo(GlobalDistObj);
9 y# |# n& ^ A; w* P+ B2 G8 O if Row = -1 then -- since 70. u; g0 s' h ` u* p
if lan=1 then
5 N$ c& v0 l0 @$ t8 x5 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- ^5 e" n( Z- f
to_str("in der Andockstation: \"",?.~.name,"\""));
, F" ]" G' W' a else
+ g& Z4 z/ w+ H" g$ V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& n5 `( }. Q7 G2 X9 t2 ]" O9 Q
to_str("in docking station: \"",?.~.name,"\""));
% ^0 I4 L# U; I' n7 g) m3 J7 K end;
9 \- O( Z6 j4 g+ o$ P) }: | else4 D0 R8 ^( x1 r' G' w/ S+ Z$ q/ j
@.Destination := assignLObj[1,row];) Q. ~6 |1 k) x/ A6 K# R( U: d
end;
* c$ b- X3 r( c" Q Y E* d newDirection(@);
, g5 G4 ]6 ^2 N, i' H" ?/ F @.HasOrder := true;
( { Y8 Q: L* `6 {3 a2 H% a. ^ end;8 @" l* L6 r# H/ A: i
end;
' n* ^6 M3 g# q0 yend; -- of the method6 a8 |9 W3 h5 H+ r2 s
|