/* called by: entrance ctrl of the object 'track'
. s7 ?3 N4 {- |( u1 P9 y% w; V*/& f1 j" H* J, n7 D7 U/ G. m
is1 p' v, }8 Z/ A) g1 _+ A* D3 e) f. @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 S1 b. Y! K2 Z9 x( j
do
- \: x8 Z' P: y- [% R Lan := rootfolder.Internal.Tools.AOLlanguage;/ ~1 k) |( D5 {5 g9 E6 b, Q5 }. E
if current = @.Destination -- else return
& H" R; S4 `5 }4 x3 E then
4 W0 L3 W& k' X$ V @.Destination := void;
+ R, E+ H7 \3 r1 u if @.occupied then
) f- O5 g R1 [ part := @.cont;% Y/ d. Q0 q ]+ `& @
@.transpOrder := void;
. k+ H7 W( ?) X& I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# c. @7 ~2 E* |' ?0 S
@,root.eventcontroller.simTime);5 \- O6 ^6 }' u2 v+ b
@.HasOrder := false;4 v6 a* X t( L
@.DrivingHome := true;9 c( L! g5 r0 W7 I% ^
rgManager.tryToStartTransOrder;
% Y$ x1 t2 h/ X5 h5 K; ~ if @.Destination = void
+ i6 B. l4 _5 Q then -- no transport order for vehicle @8 u; z5 f" Z' t
@.Destination :=
% g: ]. M! n7 ^* } rgManager.nearestFreeStation(@,track.~);( U, t' V" o/ ]- Z4 ]
newDirection(@);
& i9 A# d+ c3 q if @.Destination /= void then
( ~4 B" d2 k4 J& M8 `8 g+ ^ @.Destination.NumReservation :=
& v7 A4 o! i1 w5 l! E7 g @.Destination.NumReservation + 1; z @( E: ^7 ]6 l* M
end;/ K6 Z8 x7 D1 d2 ^8 z9 y) K
@.CurrIcon := "drivingHome";
' b$ ?, |+ H% Y- C/ g: \& y @.DrivingHome := true;
$ v4 o/ t+ N5 o9 x4 q6 L end;
- @1 j( n1 Z, Z! G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% J: ^, i7 Q* Q! Q* @1 E part := @.transpOrder;+ M8 b* w$ O. k8 M- u
part.move(@);-- load part: A/ m: ]' ?. h3 J7 s& }6 k+ F
@.CurrIcon := "load";0 W1 q+ M s/ y9 B1 a4 `: Y u
GlobalDistObj := part.globDestination;
6 |9 M$ N8 J/ f assignLObj := rgmanager.rgAssignL;
0 u6 B+ s& J2 O. }* H row := assignLObj.getRowNo(GlobalDistObj);9 L! i3 x3 J; w, |) d
if Row = -1 then -- since 70* E1 h: }) s) G
if lan=1 then
' y2 f7 S: E* c; @/ ^" x ~; d9 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! r0 P# J2 L. u4 S) {
to_str("in der Andockstation: \"",?.~.name,"\""));; T3 X4 F" Y, b; L6 t
else E6 ?& {* i" y- N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* i/ ?+ Z+ u) R# z; W: L0 \ to_str("in docking station: \"",?.~.name,"\""));
3 N$ O2 m* b& e6 e end;
2 O9 C' r! r2 V, n$ X6 Q: X else) |* j/ D( S5 y# L3 }
@.Destination := assignLObj[1,row];
$ H7 O9 m8 v% h. S' j end; m) [9 Z# I- C% u% F4 Y \/ f9 W
newDirection(@); |* ~# K3 J2 d
@.HasOrder := true;
- z C8 j- H7 r$ V+ j end;
- b. [: l/ B, ]+ x' y end;
9 q U% D! X2 k& z, S7 J* A {end; -- of the method! b `, e# [- A* d
|