/* called by: entrance ctrl of the object 'track'. F3 Q: K, J: C$ P
*/4 ?5 _0 j5 h7 P- L! f# U1 o: D6 x
is
9 r: A& |8 n9 L4 f6 g6 ~- p% j( N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& Q- L& y t& A0 v$ l( _: }do
6 C0 ~+ D. H1 a1 ? Lan := rootfolder.Internal.Tools.AOLlanguage;1 a( r! e1 y6 }8 N# `2 a6 u
if current = @.Destination -- else return5 r' k$ [: }# U- z. s) d1 {: o `
then3 @: p0 L1 T: H/ d3 m) L$ d6 e
@.Destination := void;
; b { V' |4 I if @.occupied then
: m/ ]2 q# @- N" R part := @.cont;7 q- c% N! ?4 k0 Q" E
@.transpOrder := void;
0 f3 u$ |9 w: I. w! Z# G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ |' @, r j' x1 n0 d- d
@,root.eventcontroller.simTime);# A) t& l, e$ D, y8 A9 k: ?
@.HasOrder := false;- S+ g5 Y S3 r/ ]4 a4 S/ f+ {
@.DrivingHome := true;0 z: }, j" h7 M
rgManager.tryToStartTransOrder;
6 G4 V, C# g7 V# P) S if @.Destination = void
9 t9 E- Z" z$ g( W) Z2 [& f# F7 K then -- no transport order for vehicle @/ d0 B1 t @! k3 m+ Y2 f, X% f
@.Destination := q* y) D. d8 J1 P+ w) @" I
rgManager.nearestFreeStation(@,track.~);3 P: o, i% z- K0 p
newDirection(@); 0 t: F! K0 o' W
if @.Destination /= void then
& P6 o* Q! P- b( c0 e2 m( Q @.Destination.NumReservation :=
+ V7 [) D2 o- D0 ~ @.Destination.NumReservation + 1;$ f& a% a# P% N, }9 a4 f+ S
end;
2 O [0 v3 o2 |: N$ q" _* F- ]: D% ~ @.CurrIcon := "drivingHome";
( ~4 C; `+ i* u( i: k @.DrivingHome := true;
% v1 A/ k; H! G2 z# E0 c! J end;
$ d+ O8 [9 w4 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 U( ~6 T% J ?$ ]+ j8 e$ m
part := @.transpOrder;$ M$ T" M ^- l+ U* |
part.move(@);-- load part
2 y: z: E- Q1 O5 `/ } K @.CurrIcon := "load";
2 W _& J$ O# Q+ a8 v, o GlobalDistObj := part.globDestination;
/ _" H% V5 l" E1 v2 c assignLObj := rgmanager.rgAssignL;
% ~* C1 w E, p. v row := assignLObj.getRowNo(GlobalDistObj);
' q; `. e H5 l% t8 O, b5 _8 q; u if Row = -1 then -- since 70
* q% @7 Z* n8 _, D' y if lan=1 then# e3 y t+ k/ H& S4 g% O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 ]+ }/ P5 q4 z" y+ i
to_str("in der Andockstation: \"",?.~.name,"\""));8 X: k5 u9 W/ d2 W3 D. g) q0 m3 @
else
5 j& z! y% V* N! g+ X+ ?1 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 z9 Z4 h6 H9 F$ B, q to_str("in docking station: \"",?.~.name,"\""));
# H7 F' P4 k1 t: W# ]: q" P end;
* p5 e% b. b: Y3 B( A7 J" R# M) D else: r1 Q/ c$ B. a9 D' A7 [# s0 _
@.Destination := assignLObj[1,row];
7 R* g3 M" O6 ^ end; + o' O% Q: C% R$ i) {
newDirection(@);
9 u5 H! w' l: d* y- ]6 V6 M% W @.HasOrder := true;
0 R5 o i: k/ @/ | end;
6 T, B0 G: I; ?7 l end;
+ E' `/ {( w$ Aend; -- of the method
& i. { A; E* O7 u! x& y/ B |