/* called by: entrance ctrl of the object 'track'
, z. a" D; t& B* }2 V+ \: r*/
( e5 i& S9 H, bis
8 o- a* L* t: Y( V) t4 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ r3 Z8 H' E5 R6 K- Q/ }- wdo3 G4 U# ] e) Q. |
Lan := rootfolder.Internal.Tools.AOLlanguage;
, I: N5 M6 x; C if current = @.Destination -- else return
6 @6 }8 R& I2 x0 z+ ~* h7 K then1 W/ n5 ~, V. K+ R+ W( ^, O1 t
@.Destination := void;
2 @6 h0 a0 s% u" E; I$ w if @.occupied then1 p9 v/ E$ Q6 j! z# u7 c
part := @.cont;7 F& R% C; O! m4 B- d2 H& R" L
@.transpOrder := void;
2 U6 J1 F# ]& x% }6 C* C* K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 e. P/ R8 J, \5 o1 `
@,root.eventcontroller.simTime);2 C: r7 E4 [- n: ^" k
@.HasOrder := false;- H% \. d2 u! P% W
@.DrivingHome := true;
; w) o% Z, p8 k; x rgManager.tryToStartTransOrder;
4 N1 w8 p, ?+ G. } if @.Destination = void, j6 i% u3 @0 ~; n
then -- no transport order for vehicle @
7 D8 P" B0 [8 @( r @.Destination :=
: c2 k$ f7 {8 D% y p& K rgManager.nearestFreeStation(@,track.~);
" i# V6 N! y) ^3 E newDirection(@); , r2 v, l \0 `% t1 i
if @.Destination /= void then
# t- P# i5 n* T: q @.Destination.NumReservation :=
9 K8 e+ H0 |% P4 R+ y# A. G @.Destination.NumReservation + 1;1 \8 U% Q$ E6 G1 @; t- o
end;
$ Z$ ]. L* N3 H3 y" }2 c9 D @.CurrIcon := "drivingHome";
& f# B* C& ]6 H2 ^ @.DrivingHome := true;
( Y, _7 d- X4 {( Q7 q! {# ? end;( U( z5 e) Q" `0 S5 X; j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 l- j9 i0 Y4 z& V R! Q6 w& n+ t
part := @.transpOrder;, B( @2 N; b7 u- }% C
part.move(@);-- load part5 `) S* |3 e; ^& w
@.CurrIcon := "load";3 D) g: ~- s+ v
GlobalDistObj := part.globDestination;
. @2 C% c0 p# u. f. Y/ m* C assignLObj := rgmanager.rgAssignL;
1 S4 _9 ~% ^" S row := assignLObj.getRowNo(GlobalDistObj);- u4 ^& }7 C: F3 B
if Row = -1 then -- since 705 P1 n- @' j, ?; N z1 n& f+ u
if lan=1 then: i6 l( ~+ {) k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% s/ F) U# d# K1 J( P9 [6 X
to_str("in der Andockstation: \"",?.~.name,"\""));
1 H1 P" e: V9 R+ _+ X+ ]* R ~/ }. z else
: k. X# @; S& y3 t: ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 X6 y+ Z7 o; i# q2 X. U
to_str("in docking station: \"",?.~.name,"\""));
) s- K* Q. H: |' @; I1 s8 M- P7 C: L end;
3 ]+ Y0 T: U% V! s5 g+ P" L else& S6 R4 h- S: i% u
@.Destination := assignLObj[1,row];% r1 a$ ]: i1 l; l
end; ! m: F# G( z1 B9 F* A) d8 h
newDirection(@);
( @/ _* O( J% `/ k* P @.HasOrder := true;' E- Y( E# o7 R2 ~/ \4 `# |
end;
# X! t2 _0 l$ s7 A end;1 ^8 Y. v% G: E2 T2 M, w% ?8 e
end; -- of the method- \7 E) Z/ z; q1 K# O) d! v. g
|