/* called by: entrance ctrl of the object 'track'- c8 K+ s$ A- k0 q B; h9 W
*/+ F8 }0 N) G! } O
is
& k+ o% M( J* K part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 `" ?* y, @9 p
do
5 p7 J! h- G! T8 }" p) E Lan := rootfolder.Internal.Tools.AOLlanguage;
+ v( X. d" X8 f2 N/ M0 N5 D8 ^ if current = @.Destination -- else return
* V4 H" H4 Z5 h9 P/ e then
* L% d& Z" w$ _ @.Destination := void;6 V" _/ ` S+ F9 d4 e
if @.occupied then3 J7 P' `8 H, n9 C+ o; m L
part := @.cont;
$ l1 o$ z, {- ~# A$ M4 B @.transpOrder := void;5 ?% I* y* c, d2 f; ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: {# S( o6 Y0 M
@,root.eventcontroller.simTime);
# h4 \ ?; n$ t w' C1 q1 W3 X @.HasOrder := false;
5 M7 ~8 l4 ]8 t: t4 z @.DrivingHome := true;
; ~1 S3 x; c4 K6 [' [7 X rgManager.tryToStartTransOrder;
$ I/ N9 f! P( Y9 r! r" _ if @.Destination = void" u4 Q7 L2 Q3 h" h
then -- no transport order for vehicle @
* v6 t9 u/ ~3 A8 S( u @.Destination :=
; @. T. o7 g: [ rgManager.nearestFreeStation(@,track.~);
3 c! U7 X& q6 ~2 \: S5 ~% n, Z newDirection(@); % b4 S- f9 F! ~2 t) i
if @.Destination /= void then e/ d6 s+ l( T
@.Destination.NumReservation :=
m" c" _4 Y/ Z @.Destination.NumReservation + 1;
8 [8 |$ f; T M: e v0 Q, V end;
2 S% A; ]! {7 o8 B, T9 j @.CurrIcon := "drivingHome";
% u1 j2 G( {7 @ @.DrivingHome := true;- P% m$ h: z& {5 E4 g
end;
5 l0 ^% \- U- U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* z G+ L: J. q! ^2 _, d8 Z. a part := @.transpOrder;' ?$ o) Q( R" W+ Q& S' A |
part.move(@);-- load part% M L- d* h) ?# T c/ m9 h" z
@.CurrIcon := "load";$ A* `) z, g3 c5 d& }* `
GlobalDistObj := part.globDestination;4 w6 m5 l9 x/ q+ p2 g
assignLObj := rgmanager.rgAssignL;
0 M' d; x ?$ B7 u' k- K' p9 B5 w3 K$ S row := assignLObj.getRowNo(GlobalDistObj);7 s! S$ A9 u/ g7 s
if Row = -1 then -- since 70
4 T) W% | b8 x* b1 p5 T if lan=1 then' Q; }# }' \4 _* A3 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ {7 U6 x: G. F( q0 e" H6 K
to_str("in der Andockstation: \"",?.~.name,"\""));$ {* c! W) n8 H3 K1 Y: h8 f, B4 p
else) V$ x2 J: J* z M2 V) v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 b2 G2 w! ?+ ?& |, l# S
to_str("in docking station: \"",?.~.name,"\""));
6 _0 E4 L, T1 X$ y% |8 v8 b- Z* T/ p4 I end;
1 ]3 b# O6 A/ o/ U1 w else
' e$ \( Q, O/ _, I9 f& _ V @.Destination := assignLObj[1,row];
5 Y7 Z6 Y. o" r1 g end;
$ d, J0 j& ?3 U1 r newDirection(@);
& l, {: M8 U8 b: P* x" m9 R3 i @.HasOrder := true;
z v. ~/ ^/ w7 K5 j+ e, J% Q end;9 h4 G; {; }& W+ y
end;8 Y" B1 W. s _* X* n! { j
end; -- of the method( B% o6 ?7 l0 T/ F0 Z
|