/* called by: entrance ctrl of the object 'track'# J7 R, T) k8 w+ d& C% G
*/
/ o+ U5 ? M) j0 K5 d8 E% His
# i1 c* ^2 k0 V2 Q$ l2 j" a* } part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ S- ?& T& r% {& a: Q
do
- R$ O& L- v3 J0 f Lan := rootfolder.Internal.Tools.AOLlanguage;
5 H4 L1 X+ J% u& B if current = @.Destination -- else return$ m5 d$ j# S' M# u; y+ D, |% O
then$ Z/ o! T0 h z1 C1 r+ a6 [. }& U
@.Destination := void;
% [$ a; ^+ {/ p: Y. F. \ if @.occupied then
/ `3 m# Q5 g/ D) ?+ f/ ]' `1 j4 r part := @.cont;
) t3 s& D( k9 ^, o6 W/ i' a5 T @.transpOrder := void;+ Z8 _8 O1 [7 Q. u; B4 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 L, k$ H" c; w1 f0 h, K @,root.eventcontroller.simTime);7 q& ?$ e5 F8 n7 u l7 y3 ~$ m
@.HasOrder := false;5 E% L2 O- i& I; B5 }
@.DrivingHome := true;
: N, p' V8 V& N+ p, k0 R. ~ rgManager.tryToStartTransOrder;
5 f4 E, | b3 p3 J if @.Destination = void
& d% U1 a$ t* ~2 x then -- no transport order for vehicle @- h- p K0 K4 p6 {4 {; B7 Q
@.Destination :=
% v- \, J1 o) x5 n+ Z. W rgManager.nearestFreeStation(@,track.~);0 g3 B5 @! p# f9 ]+ ]
newDirection(@); ! r5 ^! j! U* X
if @.Destination /= void then
7 i5 S! p8 {8 F- k% f* E @.Destination.NumReservation :=# e- _: ?) \. R0 t
@.Destination.NumReservation + 1;
" u' x1 `2 [/ N1 S, N' [ end;! g+ w% E4 W3 b2 I# Y' }0 x, B" S
@.CurrIcon := "drivingHome";
* S- _4 _8 _$ e+ Q( G1 R D @.DrivingHome := true;" u) ]! r5 a8 _& Y5 s! X
end;
6 P( P! z! d* [+ z: y else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ J5 q/ C8 z3 {- w3 S+ O
part := @.transpOrder;$ Z5 z- A, u" U: r) g+ w( F) ~" E
part.move(@);-- load part: g/ |$ Q) }! ]4 I8 ~+ n$ m
@.CurrIcon := "load";) }! E1 k) }/ w+ ?4 W
GlobalDistObj := part.globDestination;# f: l- T- V0 c# g
assignLObj := rgmanager.rgAssignL;: j+ V7 H& L/ |5 X& M( Y
row := assignLObj.getRowNo(GlobalDistObj);2 G! F: @8 N8 N% g5 O0 [
if Row = -1 then -- since 70, E8 i7 w' v8 X6 |
if lan=1 then- P' H' p" c6 P- B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) G) C. d" l; r, {; T- [3 Y
to_str("in der Andockstation: \"",?.~.name,"\"")); F+ D2 i: T' r' a8 c" s
else5 J2 M" B) |3 l7 a+ Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ k8 ]5 F$ b/ M! k* j
to_str("in docking station: \"",?.~.name,"\"")); . L f+ c( X9 X* Y6 a
end;
) V# l# q! ]% O- g8 E else& r$ b6 u/ y! A
@.Destination := assignLObj[1,row];3 S& x. k5 L. P% v
end; $ L6 X: F- u1 j6 ^% B
newDirection(@);
- C0 a& c0 f2 g; T1 v0 t& X @.HasOrder := true;
! [3 e0 }1 {/ N, U( q' K9 F* `: K! s8 b end;6 h; K# Z5 Z; M# j
end;7 f" r9 l, t. Y1 n
end; -- of the method
& _* o# Q D1 h& B3 | S0 s8 W; f |