/* called by: entrance ctrl of the object 'track'
6 c2 p3 l' f, p7 M*/4 C& m4 E! H' |6 m) a4 Q
is
' J3 z$ d; @+ ?! R7 y1 m$ a$ S4 L2 f. a* I" B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 Y/ z; i) L* Y* z% o! Tdo$ P$ f5 l1 L V3 v3 r
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 y! t! R$ Q- V* t, I* M7 U if current = @.Destination -- else return! S4 g% r; \% z/ ~
then
7 E. {3 p. m/ L! L% h @.Destination := void;1 z8 Y* ^, o4 J- c* {& k
if @.occupied then
/ i- r$ ?' ?& f! g) V" R part := @.cont;
) B+ }8 M1 c0 I2 r0 S4 e6 X @.transpOrder := void;
j( P2 k- X1 {+ }" k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, d1 B- ^; h# Q' w) {6 X9 z
@,root.eventcontroller.simTime);
& G8 L% P6 `4 s$ Y5 l @.HasOrder := false;
/ c, }' N% R- s/ j- E% t& m @.DrivingHome := true;/ E" Q* M( n X8 F0 c& \$ g2 L4 R
rgManager.tryToStartTransOrder;9 w! j* Q1 Z P) s0 {, [, F
if @.Destination = void; |0 M% ?, U4 w; b; a, e6 c
then -- no transport order for vehicle @
+ K4 i8 Q* I8 o7 x: O @.Destination :=
! k9 ~( B; f3 G% ~; U rgManager.nearestFreeStation(@,track.~);- [9 z, \7 |& L
newDirection(@);
+ |4 Z6 z4 P% Q& v if @.Destination /= void then
7 w; [* N. ~5 l1 S/ |; B4 O& {- ` @.Destination.NumReservation :=
5 g6 g7 |7 \" q7 [8 c' [ @.Destination.NumReservation + 1;( ?8 z, V2 b" Q/ B
end;1 i" x/ a' ^2 e" I9 y4 m0 h. U' ~
@.CurrIcon := "drivingHome";
, k# Z3 F' |5 s$ B9 K6 M& K) O2 ^ @.DrivingHome := true;+ J! c! J0 i5 @ ?/ @9 `7 {" o
end;, h2 m- k( `. g) p! q2 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 D4 Q$ x D( h9 d2 F/ B! i2 @: U# n part := @.transpOrder;
$ V+ F9 Z! r/ J0 R part.move(@);-- load part
$ g% a" b* B; w: t @.CurrIcon := "load";7 r! ` p0 m M, Z( H2 M- n
GlobalDistObj := part.globDestination;
! n! I. x4 P# A2 X+ d% B2 } assignLObj := rgmanager.rgAssignL;, l$ { X7 I/ v) ]
row := assignLObj.getRowNo(GlobalDistObj);
: |4 u2 q3 }9 P6 _ if Row = -1 then -- since 702 e# j+ P6 g) V5 P9 m4 t) F
if lan=1 then5 { Z- G. f/ p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 l' o) R: m% E3 U; S y, z* A
to_str("in der Andockstation: \"",?.~.name,"\""));* \6 P5 W9 z: t
else
1 U+ J$ A1 J1 }. E# F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& e8 c# C( R( D$ m to_str("in docking station: \"",?.~.name,"\"")); 0 c1 ]4 o# E# m" E1 A
end;
( d# @3 i8 ~ j/ U8 v |8 D2 W else- F! f/ O: Y, `/ Y
@.Destination := assignLObj[1,row];* z4 ]! J* [- u+ N( H9 S5 m
end;
5 ?; D$ z# M/ m" h3 Y, f( |3 t newDirection(@);3 X9 q/ z- c9 {1 }" ?
@.HasOrder := true;* O4 @+ a4 O; T" a+ C. o, s" _ A
end;5 l, A2 s* M% \" D
end;
0 M) J+ P, c4 e# A- X3 Lend; -- of the method* s9 A/ J9 m: I4 `0 a' \. z! C
|