/* called by: entrance ctrl of the object 'track'5 j( _8 B( I/ r4 R6 s6 c4 ~/ k' V
*/
- C4 H1 g3 Y7 \7 _; `- e0 i5 pis" P; L6 Z' G0 k% B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 D/ X7 ]2 x; S7 S, r
do
% q+ Y9 K- h2 y6 J+ J! I Lan := rootfolder.Internal.Tools.AOLlanguage;, Z. H0 Y6 K7 C8 Z
if current = @.Destination -- else return I+ X& ?* Q6 J% Q F
then
4 R$ S! ^$ ~# h% U' B @.Destination := void;
" O1 w& O3 v! U3 P, d3 M" [+ C% b9 _ if @.occupied then9 I+ Y6 R- y5 O5 s f O
part := @.cont;
( H/ r$ n; |. f; {, { @.transpOrder := void;
5 B1 U; J$ \" y8 A! ?/ S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, p, Y2 k+ x8 r
@,root.eventcontroller.simTime);. T$ T. n+ [/ v) k
@.HasOrder := false;
" x6 M* W% \0 e% ^6 a @.DrivingHome := true;
) ^$ G8 [; Q- f$ A rgManager.tryToStartTransOrder;
: w6 l# J5 p: e C0 _( L% F0 z if @.Destination = void" U2 u) A b) Z! L2 B1 _$ D
then -- no transport order for vehicle @
) ~6 ?. ~! I& F4 V! K @.Destination :=
7 S J$ `' G) i9 m6 N rgManager.nearestFreeStation(@,track.~);- T4 D* F2 A+ E. c' u
newDirection(@); ) Y* T; y" B& [0 a" w: d0 ]
if @.Destination /= void then, j6 y4 ~; w3 V: m4 n
@.Destination.NumReservation :=
) O1 S" t8 `! B. E& G9 M @.Destination.NumReservation + 1;" O1 a* ]5 x' s5 Y
end;
8 A- p5 _0 P1 F ~3 v @.CurrIcon := "drivingHome";
b; c8 X0 {. g: q0 {4 n$ X- Q @.DrivingHome := true;
v# I, r7 C! [' F7 V! _6 W3 q, C end;
) h' u$ \& {1 Y' e" L else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 A2 j' K O4 t! H5 A: a
part := @.transpOrder;4 ^% i) w# h* E e! U( j# g; D! J" O. l
part.move(@);-- load part& q3 w% P4 F J( i6 C! x
@.CurrIcon := "load";
$ e' N& O5 w; W GlobalDistObj := part.globDestination;
7 }% v$ k. S6 P! X assignLObj := rgmanager.rgAssignL;9 g: l5 X4 X. s1 L7 u
row := assignLObj.getRowNo(GlobalDistObj);
9 @+ Z1 v5 d g. C! P if Row = -1 then -- since 70
" ?* p1 ^, a' i. ^ R! V if lan=1 then% {/ I' u+ K! E8 Z; q' @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* f: _- H9 I2 E to_str("in der Andockstation: \"",?.~.name,"\""));! a1 U" @; V7 @
else' T( y- u( C5 H% I# Q" T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 p; V7 [9 ]! e0 n# D |' N to_str("in docking station: \"",?.~.name,"\"")); D" u0 v7 T& Z2 X5 q
end;3 V, R0 D7 m$ ?* e
else
8 d& f2 g! w+ }6 c @.Destination := assignLObj[1,row];! S+ y W/ e5 v. }# p3 H, h7 e0 l
end; . B9 Z5 i) b, V; m7 w! a
newDirection(@);
5 i4 T- F7 c; v1 ? @.HasOrder := true;7 G9 D, ~$ C. u4 N
end;0 r. K% l6 g' u N" o! m% `
end;3 W" x& z# x2 C1 ]
end; -- of the method( B2 A* W4 |# W. S, N& o) [( ^5 A
|