/* called by: entrance ctrl of the object 'track'
9 f' i( _" B$ A* l9 \*/
3 V/ b D& ~" I" w/ J A+ v/ U7 gis
2 ?2 Z! c' ?- i5 ]7 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 b+ y' a3 U3 I! h0 v: c) ^4 [" ddo
* Y" p; s# ], v. G) D' z/ W' N Lan := rootfolder.Internal.Tools.AOLlanguage;
2 ^7 i) P$ }! w/ J' B if current = @.Destination -- else return+ M0 |+ t; c [# s# S: L3 k
then% x$ d0 B1 V$ s, v" s/ j0 N
@.Destination := void;
1 U7 ?* H6 C3 h I" y if @.occupied then
9 p) j( v5 Y& j0 s9 I# Y part := @.cont;! F: K+ ~$ s7 t0 e
@.transpOrder := void;4 e% C6 I# N, t3 q7 z. v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 {' d# F! Q8 T' J- s% ?2 f. y
@,root.eventcontroller.simTime);
/ |/ D5 |- z! W* A; s @.HasOrder := false;1 o% P* u, O: X0 L3 N
@.DrivingHome := true;3 Y: I" }. ]& t' E& X4 r
rgManager.tryToStartTransOrder;. _. F/ `, q3 b! y: Y8 G
if @.Destination = void1 k7 @3 J% d' s& K" H, Z2 c% d, i8 h
then -- no transport order for vehicle @
3 f, C' o+ w' Q @.Destination :=
" }' q* u$ \- \. C& c' W3 f0 t. P rgManager.nearestFreeStation(@,track.~);
, _) S! X, R l2 Q5 M, u* L s newDirection(@); , a4 ^9 Z( }% N9 [7 T9 ~
if @.Destination /= void then# ]) x1 z- K7 Q) M6 e
@.Destination.NumReservation :=; C C, b1 Y) k5 L/ C3 E
@.Destination.NumReservation + 1;( u4 q4 I7 P7 u, n2 d5 j6 X
end;
h( r0 w0 \& B% [! R# F5 H @.CurrIcon := "drivingHome";8 v/ K( S; J ^
@.DrivingHome := true;
2 }9 Z; s/ L7 ~3 o2 V! [ end;
+ }& s, i+ x5 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 s5 A0 p* p! l9 W. R part := @.transpOrder;. Q, J8 }/ f9 v- G
part.move(@);-- load part6 G- t8 ^% ^1 U7 @+ d3 u
@.CurrIcon := "load";( |9 R1 G/ p F/ l
GlobalDistObj := part.globDestination;
( z: O: e, \ F# n assignLObj := rgmanager.rgAssignL;
' l6 n- T9 ?) ] {. J& Q) _- Q row := assignLObj.getRowNo(GlobalDistObj);
# k- A ]% |& L9 s. u4 |; I9 h% U if Row = -1 then -- since 70
: Z, U0 W# h3 ~8 u if lan=1 then
% ^% H0 c/ [) @1 y* o' y2 s9 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 N; u+ G& l! H
to_str("in der Andockstation: \"",?.~.name,"\""));
6 d+ O2 C& e7 l9 c else
( V$ q4 O7 a( N6 x& h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- }# v9 N; @, T to_str("in docking station: \"",?.~.name,"\"")); # H0 B# U0 v& j; [) S; @" r% B
end;2 o. M# N0 F! E# E$ @- P# N
else
/ ~; k+ e- {9 z; o' ~ @.Destination := assignLObj[1,row];9 E( Q4 e' G! @, h+ M
end; 0 N" {' C& U- d$ L U* Q8 E0 u- a
newDirection(@);
4 `& v6 v- v/ J" ?: n @.HasOrder := true;5 r) I: j. A4 G' h
end;
" l9 q( D( ^4 w# I) r8 X end;
2 h. [! F- P9 O7 Bend; -- of the method' N" m# m, S" K0 T' s7 `. r5 I
|