/* called by: entrance ctrl of the object 'track'
2 v0 K2 O" ]/ F: `0 f6 v*/
1 U3 k; A0 ^, u) @+ Zis
2 _0 N* I9 n! x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
Z) a6 B) e* K! y+ O4 Pdo. o8 A9 }. ~; D9 x. E
Lan := rootfolder.Internal.Tools.AOLlanguage;# u0 {5 Q; j- j( b+ u" c
if current = @.Destination -- else return# N+ v, R% k$ u5 x# _& B
then
. P/ }' Z* u3 C. M @.Destination := void;9 ^/ ^- v! i; Q' k6 e! Y3 }6 t
if @.occupied then" I- J1 P. a3 U: Y' O
part := @.cont;& ?! B' t& F& Y" z1 q; ] v
@.transpOrder := void;# S3 k' @! V8 ?9 o5 M1 j% y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' S, Q- S4 ] B( z# q6 b$ o5 C8 i! t
@,root.eventcontroller.simTime);
1 e ]2 K: r: H4 L @.HasOrder := false;
9 Q | r" M4 l6 {5 w* I @.DrivingHome := true;1 U3 q$ O* \! h- G) e% W$ {
rgManager.tryToStartTransOrder;' ~" f- R: g3 b& x
if @.Destination = void
+ G) N+ c+ v; F( w0 ?1 H then -- no transport order for vehicle @( l- H4 U' x( K$ t% ]. u
@.Destination := @4 d* I. I( x' x% F
rgManager.nearestFreeStation(@,track.~);
i% a, `- v. W# o; @% @. H newDirection(@); 7 z' {' d& @% [: _' S$ y
if @.Destination /= void then
- R$ S5 ~' }+ _. D @.Destination.NumReservation :=
# F$ q t$ p9 Z+ Z- Q6 m @.Destination.NumReservation + 1;, `7 ^/ s! H6 E6 v- C8 G$ O
end;/ T* h4 a0 f. I
@.CurrIcon := "drivingHome";
* R, @. G0 S( H1 y8 X @.DrivingHome := true;
6 z/ q. Z7 y: x' Y2 O4 C4 u1 |9 q end;* t ? R7 u0 o1 N( j! [; K8 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Q0 ?1 A3 u6 M' O# O part := @.transpOrder;9 T* P |5 g; c- V; J% `! l2 @
part.move(@);-- load part% i1 B K5 d3 h+ q, m6 a3 P/ C- M2 I
@.CurrIcon := "load";8 @0 T- N; `6 p0 P$ I9 k) j4 r
GlobalDistObj := part.globDestination;8 x3 m' {# n! f+ H9 A3 ` W
assignLObj := rgmanager.rgAssignL;# P. b, \# b; U$ I. B7 _
row := assignLObj.getRowNo(GlobalDistObj);8 S/ H0 e2 a/ o7 E, `" L
if Row = -1 then -- since 70" ^- M6 L& \" V2 o8 Y
if lan=1 then
( b$ H, Q* M* z k9 g1 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ t4 h2 V) V1 O0 T/ W to_str("in der Andockstation: \"",?.~.name,"\""));) H: p& p2 M7 ^( `( u2 `
else
0 k2 I. C3 V, J% C2 U5 n, G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 ~" o+ e. R9 j- X0 g to_str("in docking station: \"",?.~.name,"\""));
. K- j4 r- }6 J/ S end;: u5 U9 _3 t& i0 q. H* C
else
$ Q% t( Y& K i7 u6 @8 h @.Destination := assignLObj[1,row];' J5 X+ h: r0 W+ e# ?+ ]
end;
1 J+ ?0 g$ _, t6 e ^ newDirection(@);4 |4 ` ~" u' ^. J
@.HasOrder := true;- D6 G" }2 R2 |/ B, w. N; k* @1 Z
end;
) i. S3 G- _7 Q# V end;" V c, V1 g8 V8 A$ r, Y: t: a
end; -- of the method
& H' R0 I) n$ E1 } |