/* called by: entrance ctrl of the object 'track'
& H* Z. z/ V3 m m4 o( H*/- Q4 I! [7 m# d) b2 Y7 B2 g
is$ @3 Q4 @$ k' e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& t' V) Z/ U) }4 \7 y* s
do
$ S* v. k6 }- B$ F" d' s Lan := rootfolder.Internal.Tools.AOLlanguage;
1 {# T3 [" X ?( r6 j if current = @.Destination -- else return# ]+ S: ]; c; X. i/ u
then& z; R$ \' [) I
@.Destination := void;, v/ r) b5 A1 C+ _
if @.occupied then2 [4 W+ V7 d4 t6 i
part := @.cont;
( G: s' v- [! {' D* G; [ @.transpOrder := void;
2 c4 K% E; C' K) o7 `& d, T8 O' t+ l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: M( {$ }1 b9 a @,root.eventcontroller.simTime);
3 c( n1 a. Q# A' a6 G @.HasOrder := false;
5 }4 H% Y5 o) c; ~* A+ h- E @.DrivingHome := true;% T: T1 \. E% c# l1 {$ W
rgManager.tryToStartTransOrder;' ^6 i8 ^$ b9 d3 z4 p4 o2 q
if @.Destination = void
- Z' s! Q+ U W+ Q+ B0 } | then -- no transport order for vehicle @
% P3 V6 V* e' c* o @.Destination :=9 h' g7 l$ k& h w! K
rgManager.nearestFreeStation(@,track.~);# O6 d! w7 Y4 X' X
newDirection(@); 6 O! j( X' _" D% r0 n2 t- @; \
if @.Destination /= void then% ^. w3 t$ I( ~, Z( V, l% f
@.Destination.NumReservation :=
7 S4 K5 \% E+ ^9 l @.Destination.NumReservation + 1;4 M1 I B6 Z# z" T) @
end;
3 W: ^2 O7 D) p0 l1 F1 I$ q& V @.CurrIcon := "drivingHome";2 C7 O( Z6 k; A, ]6 o
@.DrivingHome := true;9 {8 x, Y/ L' l* F2 Y( ~! y
end;
0 I% L" N& L% i else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 Z5 x" u* \) j/ W" _+ Q
part := @.transpOrder;/ K- j# D4 M& k: K5 O; r* f. `
part.move(@);-- load part
& C. T9 u" t+ U! D @.CurrIcon := "load";
9 b5 \8 p3 y4 l9 L; e GlobalDistObj := part.globDestination;
: P. H \( t; i; V$ J! C$ o( F, H assignLObj := rgmanager.rgAssignL;
) f. m, B" F% b( S) _* i' Y row := assignLObj.getRowNo(GlobalDistObj);! w+ D( A, o, M' h
if Row = -1 then -- since 70
) }9 \# c# ?9 F. w+ P) b* k if lan=1 then
3 p9 ^3 [/ j* R& ]3 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), J7 I `0 B6 u+ _# O* D( L, S6 W
to_str("in der Andockstation: \"",?.~.name,"\""));
% M& b A( y2 ^8 ]2 ]* M5 H else
% F! g, B- y; @' J* P2 K7 [0 w E* `! ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 |1 i" y+ Q9 W* ` to_str("in docking station: \"",?.~.name,"\""));
8 H( J, [# t0 r# x end;
- ?- Y$ W% F) J3 [7 @$ C else' Z7 O6 t: e$ M1 d' q/ Q
@.Destination := assignLObj[1,row];. A8 \- _8 a4 l1 Q% n
end; y% Z0 O3 h& ?" i* Z3 o
newDirection(@);' L/ m# f8 b' `' D" |; Y
@.HasOrder := true;
- t+ t$ Y- J% X! G% n$ p/ ? end;1 o) x# W ?" Q5 N. G
end;/ o9 d( J5 e* D! A& q
end; -- of the method: G5 u7 }8 ]: e; r
|