/* called by: entrance ctrl of the object 'track': V6 ?4 i; f# @
*// i+ V9 ~4 G( [. k1 V
is+ q2 d! _3 Z+ w$ c* Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 i* c1 U8 q& v ldo0 I; u) U% w' ?# o) E1 K5 Y
Lan := rootfolder.Internal.Tools.AOLlanguage;) k" }% V) D$ b
if current = @.Destination -- else return
" i' \4 X, E( X then0 |4 v" r( ~* n
@.Destination := void;5 j4 E- C; V7 |
if @.occupied then6 j9 N: u) p! ]2 K! ^0 I7 I
part := @.cont;+ {1 O+ L" L5 H7 w$ {+ S' R
@.transpOrder := void;
9 _& ]( Q% v. ~9 Z5 v. L/ L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 r% ~- J' Y8 J7 n' \# a. d9 N$ `2 [ @,root.eventcontroller.simTime);2 X9 d$ D2 K @# q+ l# _
@.HasOrder := false; R# K5 p' E7 p- ^$ w7 Q/ E( t
@.DrivingHome := true;
% F. u: |# z1 w. Y/ X. f) p rgManager.tryToStartTransOrder;
, J5 w1 Z" \ c3 u. \/ Q if @.Destination = void2 m$ Z& d$ t9 a ^" p0 T9 {
then -- no transport order for vehicle @
, X: [8 R) [4 Z" U9 j" u0 x @.Destination :=# E5 Q3 \! {3 w" X2 E
rgManager.nearestFreeStation(@,track.~);
( ^5 B6 |7 Z `; [) r; N6 t newDirection(@); - Q& v1 j% I( c1 O. f2 M0 v" ]+ G
if @.Destination /= void then( f+ L7 G; M) k" |1 a# X/ v
@.Destination.NumReservation :=. B9 J8 z" X9 \1 H
@.Destination.NumReservation + 1;+ g) e6 G" l5 t, b- N5 X" I: B+ d
end;* H! n0 G) l* {
@.CurrIcon := "drivingHome";
$ ~9 W+ f, A1 E: q+ m @.DrivingHome := true;/ [! E0 O* _ t! A# g; J
end; w# Z9 d# L8 r: S1 U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ I6 ]: c, b% ~+ \) w4 f
part := @.transpOrder;4 O- r0 }' K' e
part.move(@);-- load part* s4 v% P6 Y! {) H5 l, Y9 P5 z# p
@.CurrIcon := "load";
. ~. }& [4 f! f6 `- ]4 ]5 V2 E GlobalDistObj := part.globDestination;
& A" o d6 i8 x& [+ J assignLObj := rgmanager.rgAssignL;: ]$ ?1 s& v- Q
row := assignLObj.getRowNo(GlobalDistObj);
/ M! K# N; c. ]$ z if Row = -1 then -- since 70
: l: m8 v) X" x- [+ A' I& u if lan=1 then3 k* ~$ a" T3 U) _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," i b8 a9 s# |% S Y# `; p& D0 |
to_str("in der Andockstation: \"",?.~.name,"\""));: W# Z% i; `+ E2 j2 M
else
* \/ i/ Z6 P" E" b1 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 I2 p! Q" X; T; i6 H
to_str("in docking station: \"",?.~.name,"\""));
2 V" t" s) C" E: A$ ` end;
T3 S7 E5 T9 }3 W else( h* q1 J% |" q
@.Destination := assignLObj[1,row];; p$ W4 K* e; q2 \% h0 u
end; 4 L2 N7 I/ D Z* u& B
newDirection(@);5 q: s& z- Q) E2 X3 m) K; H1 d
@.HasOrder := true;8 ]' V* v9 h, N; J! f( S# \
end;8 y. X7 T" S( F) }. u0 g" N4 Q
end;: `2 o# C: {" O5 \6 \ H& H; @
end; -- of the method- b) ~- G9 K" ]
|