/* called by: entrance ctrl of the object 'track'
$ j [# v( K$ l! t3 F% l*/; E$ J0 Q' v! G# r; R
is
4 ^5 [6 p/ r k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ {; W. r: U" W5 Ldo
9 ?# _3 i2 U4 u. L& ]0 |" D Lan := rootfolder.Internal.Tools.AOLlanguage;( R8 r# A8 b) B
if current = @.Destination -- else return
- T2 c, Z1 k- I: `" Z: r then
, k! G c8 S) f$ S @.Destination := void;& B; M3 v0 F: g v5 T
if @.occupied then! A% U( w2 u" C3 g+ `, t) @+ ]* }
part := @.cont;/ q+ B2 S( T. i0 k7 I( X
@.transpOrder := void;
+ P7 R V C1 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' o: x% Z) H- _/ \" I @,root.eventcontroller.simTime);2 }. \. Y0 N, G: w( {, {
@.HasOrder := false;
* S+ c9 n9 Y/ R5 e& c" ]- l9 N3 l @.DrivingHome := true;! Q6 F8 k& |* L, ^4 I1 G
rgManager.tryToStartTransOrder;5 |. E( Q- m3 Z( f* f w
if @.Destination = void
: S4 j" o1 K/ u: C then -- no transport order for vehicle @7 g2 ?" e9 Y6 X2 t3 b$ n9 h
@.Destination :=
6 V- ~1 _; I- O3 H- r" g0 f rgManager.nearestFreeStation(@,track.~);
% D: k/ z( Y% d" J6 o7 D: z newDirection(@);
g A8 `- k7 w& t3 J* M1 s if @.Destination /= void then
& |3 H! W/ k( o' F4 P4 O @.Destination.NumReservation :=
. [1 }# z7 O+ w' K# W9 ^ @.Destination.NumReservation + 1;' M1 N0 y+ u6 i \7 j3 T6 \2 s
end;( b. Q/ N" q6 u1 I. J
@.CurrIcon := "drivingHome";
# @7 A5 a) k6 x8 [- s6 z! Z @.DrivingHome := true;# f/ ?8 J; J$ b6 m
end;
7 A. t& C0 n" f9 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 [+ Q6 I9 X0 A+ N
part := @.transpOrder;/ {- Y3 W: X) S4 K7 d" B) p( g1 T* \
part.move(@);-- load part, r, S5 {8 `0 i/ L9 `, r
@.CurrIcon := "load";
4 ^. |' a: o- I5 n# N( g GlobalDistObj := part.globDestination;
+ U) V8 z2 Y/ R L* R, T% i assignLObj := rgmanager.rgAssignL;6 f: u7 p8 s) S& s3 N4 K% T
row := assignLObj.getRowNo(GlobalDistObj);
: r) U/ Q( y+ k; X if Row = -1 then -- since 70
" `- D7 N; C6 [6 _& | if lan=1 then
0 c" a" `. C! a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; E% n A; Y0 p; P% `% ]. r to_str("in der Andockstation: \"",?.~.name,"\""));
& j7 H# J Y+ K: _% t else0 K$ n+ \1 l7 [5 z5 K+ i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 U9 q! D! a0 v to_str("in docking station: \"",?.~.name,"\"")); b( O7 F6 d7 t0 `% u+ i# `
end;
b" a. q' t3 C" E, d1 R; q else
% O" _, }$ E- w- o N2 p( n/ D @.Destination := assignLObj[1,row];( h! [ v* _# J7 A- ?# G0 |
end;
$ n0 e. r8 m5 Q& Z7 } newDirection(@);
. C) h! Q2 A' X8 j' R* ?& I( A @.HasOrder := true;
2 |5 R9 L e8 N5 k end;
! B3 i% P$ I; O/ ~' V: t8 C end;
?8 M n9 d- N' p9 C) I0 m: z/ xend; -- of the method
; R: p2 f3 m+ W# f/ r$ H |