/* called by: entrance ctrl of the object 'track'
5 L: _& z% @. ~; ?% O; k, V7 y*/
! N3 _" T+ t) l$ O7 _8 X6 Eis
1 R/ b$ \& A& r* I0 U( z part, GlobalDistObj, assignLObj:object;row,Lan:integer;" R/ E; C8 C/ O! R& Z$ w
do) A! @' n2 [$ h8 I Y
Lan := rootfolder.Internal.Tools.AOLlanguage;4 k' L v2 P, b4 n# |) J
if current = @.Destination -- else return1 _* T5 i$ ]" U O q3 `
then4 S9 t- m: B1 l
@.Destination := void;% H x3 _9 M7 h- \3 l1 q+ f6 z
if @.occupied then' Y, K' O* K5 y- p3 @1 n) x# e
part := @.cont;
4 `) t# y5 O& K. u# A3 X9 \ @.transpOrder := void;
" i- l2 s( O; m1 v: K, j, s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# _+ I2 ?& a* Q3 J$ N; k6 `/ h @,root.eventcontroller.simTime);0 G, R( A- K3 H0 h9 ^
@.HasOrder := false;0 }4 ?% K" z; e9 n: C8 \1 ?& l
@.DrivingHome := true;
/ S. j$ e% v1 e- |; X, S- w# R rgManager.tryToStartTransOrder;
$ f( [# a! b' T: n if @.Destination = void
' V# B% G5 n8 y1 A( A9 o- _! n then -- no transport order for vehicle @
* m6 g, t. K) Z @.Destination :=6 I* |+ C0 i$ P/ W
rgManager.nearestFreeStation(@,track.~);
; ?7 ?8 g0 R. ~ newDirection(@); 9 v4 I0 W. F0 z9 Z& }6 G
if @.Destination /= void then
7 {; B6 ~% m; T6 P k @.Destination.NumReservation :=
& [& H- d& q* A5 \: o' e @.Destination.NumReservation + 1;
# e/ ` D& K. ^+ ]+ B% g# r end;
' g o% o d, X0 _ @.CurrIcon := "drivingHome";: m. o( V- t* `# g0 {
@.DrivingHome := true;+ e6 {- p, f5 L' i6 X- J7 `4 H2 C
end;
0 `# `9 k9 C+ F, ?% q2 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 i _$ y4 P; `3 M part := @.transpOrder;
4 ^3 M s0 ~* I. ~, W) U- w" |, i part.move(@);-- load part) Z3 c2 M; ]) H' G) J! C9 q, e
@.CurrIcon := "load";. ]: h, \4 S8 {2 I
GlobalDistObj := part.globDestination;
" d) F% d) O$ O+ a4 c) h assignLObj := rgmanager.rgAssignL;
& D) d, _8 e, ^9 u5 Y row := assignLObj.getRowNo(GlobalDistObj);
% ^0 X, z5 M& B) q& D- | if Row = -1 then -- since 70- i$ B7 ?& v% o" m
if lan=1 then
) M# R0 y% J/ k: w; F1 g# [5 e; V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, j! s1 n8 g! R# k& m# c: O to_str("in der Andockstation: \"",?.~.name,"\""));" q4 G; X; E) ?) u
else0 A) u" { ^* M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, Y' i9 v9 k" O' L, D
to_str("in docking station: \"",?.~.name,"\"")); / ]) |0 S; r8 @1 U c& T
end;+ H5 Z% f, H; T/ B( l# F
else( z. T f8 @. @6 B
@.Destination := assignLObj[1,row];
. n) v- x3 V' _7 L end; 3 @0 W% ]3 W2 c/ X! \
newDirection(@);5 ^3 ?( y4 C! k8 C) m
@.HasOrder := true;
% ?$ u8 d4 _8 {. E8 \0 d6 v end;
0 j' V* I9 {- o' i& Z; v8 C8 | end;7 V- c4 O+ y! g( S# Z+ b+ }
end; -- of the method! J' v5 T5 L2 q0 s
|