/* called by: entrance ctrl of the object 'track'
! N0 k8 W7 j" q! Q*/! Z- ~5 n9 }7 z* k; E
is1 w; X; q2 S* I: `
part, GlobalDistObj, assignLObj:object;row,Lan:integer; s. }+ e0 @$ h) r- c+ H
do% Y7 o; J" [5 T% i/ b9 i* e j5 h# ^7 [
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 p, R/ D# z, G) g8 x3 D if current = @.Destination -- else return$ }% V' j- {2 i* m# e3 P
then
; W7 p0 E4 k4 N- e* \7 y) ` @.Destination := void;
% w: H& M6 R5 j. H if @.occupied then
8 u7 \& b2 @9 t3 j$ f7 ^( V part := @.cont;$ E% M' b+ D; I, ~
@.transpOrder := void;
- s2 Y) y5 N' v. k0 }0 @, o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ k+ y, S# G8 L @,root.eventcontroller.simTime);5 B' c) S/ [; I2 m5 l d4 R: | x. f
@.HasOrder := false;* o# g8 \ T4 u
@.DrivingHome := true;
7 F1 I/ x, ~$ g0 L/ x% \ rgManager.tryToStartTransOrder;
% u+ I9 V% M, [ if @.Destination = void( X$ ^( \1 E2 c' U% R' z* {# v
then -- no transport order for vehicle @
* J! ~1 `4 I+ n* n; q* Q; L @.Destination :=2 \- p* v* A& |5 g6 g6 V
rgManager.nearestFreeStation(@,track.~);4 R. g% j+ g" x& @
newDirection(@); 4 k3 w' W2 a# ]; k8 g+ u: \
if @.Destination /= void then7 i1 O `+ i) k" w- h6 z* S
@.Destination.NumReservation :=) E" M4 b9 h1 q8 @0 g) W
@.Destination.NumReservation + 1;
^" R+ R, s! m g end;7 y" G' q4 u; K/ @
@.CurrIcon := "drivingHome";
4 O) N# P9 U7 B5 }$ a! Z% X @.DrivingHome := true;
3 ^" N) T! i/ X2 T9 c* S7 g- K" u end;
; w7 d6 n. q, u( E/ c8 l4 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ E! W7 y# J+ w+ g part := @.transpOrder;
X. g7 H9 s" v6 K part.move(@);-- load part+ \( ?& \. r3 M0 f8 c
@.CurrIcon := "load";
) Z2 E& _/ O" @3 Y GlobalDistObj := part.globDestination;
+ w# C0 @ e6 L- A4 S assignLObj := rgmanager.rgAssignL;
6 E ]2 o5 p( D7 @/ B row := assignLObj.getRowNo(GlobalDistObj);/ X- J8 w' m0 m+ h# C$ k! ^
if Row = -1 then -- since 700 ^7 e7 _* `; `5 s$ X% G7 Q- c
if lan=1 then& o' t \2 k- ]: X/ P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 o. r+ U0 \; q5 b4 Q1 B/ x to_str("in der Andockstation: \"",?.~.name,"\""));3 ~! M( \# c. R7 X3 Q8 y& U
else
: y* ^: l& J: k1 }! P. u& H w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' T" |' P, G' Z5 \; H5 s to_str("in docking station: \"",?.~.name,"\""));
" U3 c0 n- D; `$ R4 q end;' {$ d5 U* R# g. h- _
else2 ~# r0 h9 G" r
@.Destination := assignLObj[1,row];
6 U6 o2 T1 s8 {: p$ i# z end; 7 k3 g2 f2 S6 s9 M" Z
newDirection(@);- f0 K% I5 m% \7 \, Z- @
@.HasOrder := true;
1 Q; \5 |0 o) e0 ~+ A" O end;/ Y7 K9 i/ Y2 d o( {% c0 [) c3 _! @) ?
end;$ R4 i# C4 C+ W4 M! W4 z/ |5 |
end; -- of the method
) O. z4 h4 t. F$ M# {: ? |