/* called by: entrance ctrl of the object 'track'' a+ y8 @+ v, A1 d
*/
0 a1 g7 Y z% m, B* i: f: Mis3 A1 z9 f( T6 p8 ]7 S* H. v8 Y. ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' J3 M9 n7 z, _" N' S+ [2 p
do/ G4 M- Q | x, E8 A0 ?; R; X
Lan := rootfolder.Internal.Tools.AOLlanguage;" l0 P' K2 ~0 R; d! |
if current = @.Destination -- else return/ q7 p; h+ d% O7 e8 h& J
then6 p& z$ h2 H, g" Q& [4 \
@.Destination := void;
& s4 q) w' g' `$ |0 \ if @.occupied then9 w+ ]( ~% W3 m1 q% v
part := @.cont;% p& L0 q* `- i4 `; p" G: [: H
@.transpOrder := void;' i& O& c% P. b: c4 F$ Z2 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) q& w5 M0 ^ J' C5 z4 A: E @,root.eventcontroller.simTime);
5 j; m z4 q5 r4 I @.HasOrder := false;% {* {: A0 U- d' @5 n+ W6 s& }7 i( `2 z
@.DrivingHome := true;
) ?- l( [9 y! c. f rgManager.tryToStartTransOrder;0 n! y) ~/ `1 l' I
if @.Destination = void
2 O# P. \! P M" u4 Z then -- no transport order for vehicle @, n+ i& ~. J( @! o& S! n
@.Destination :=
6 c& b6 n, Z8 G) \% y' Y% P2 L rgManager.nearestFreeStation(@,track.~);. [. q2 j, i5 M+ G7 i2 [
newDirection(@);
* _8 y6 m0 `/ E) i: i; [9 R if @.Destination /= void then$ ~9 J% _5 n2 E" i' q
@.Destination.NumReservation :=
- O; w% h& |& B0 {$ l. Q% o @.Destination.NumReservation + 1;
) F+ C- |/ n6 Z3 H. b5 F* x/ g6 s end;+ F2 Z9 o; S& A' e2 o; t3 T. ]
@.CurrIcon := "drivingHome";5 D0 D+ G- T$ J7 [) M- m
@.DrivingHome := true;" v! {! H0 u3 O" }
end;$ a( @1 g- \" p6 c6 U1 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) P$ o7 s) a6 H4 ^7 o$ h" Z$ `
part := @.transpOrder;/ y T$ U, N( _! X0 h& a. m
part.move(@);-- load part
& |+ s! K1 y" I, A. }9 C9 [ @.CurrIcon := "load";
1 X7 H; n3 }9 X/ a. V GlobalDistObj := part.globDestination;
5 `! S9 }5 M" M7 y% O& i assignLObj := rgmanager.rgAssignL;
8 n5 `$ K" ]" Y g' m1 K0 Y" S row := assignLObj.getRowNo(GlobalDistObj);( K9 j$ T0 ]- F; k& l: X
if Row = -1 then -- since 70 p$ e- Q# |9 e$ |+ Z' e
if lan=1 then$ x% a! q4 W+ M z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& J8 Z0 W! l- Q5 q9 }
to_str("in der Andockstation: \"",?.~.name,"\""));* m+ U! ~/ N0 g6 _7 ]+ \8 g
else
: ^- }. Y8 X7 A4 \7 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 w; x* e( M, R8 j7 G* ?8 k
to_str("in docking station: \"",?.~.name,"\"")); 8 t% x- t" u: I1 n1 F. U( u/ ^
end;' w2 d" s7 D1 L9 a" m1 a
else4 `) H; a( w9 z6 _2 W- ?6 }
@.Destination := assignLObj[1,row];1 V/ {( D8 y0 l6 |2 l
end; - G$ e" _6 I& e0 y* v0 K [
newDirection(@);
% j8 o: ?3 k" \# M" T @.HasOrder := true;% ]+ T% L9 ^# r5 Y/ g6 [1 a% }' r* }
end;) _% F x6 r& w! \, {0 {; W1 O
end;% X" T) U0 T& M4 {* F
end; -- of the method! L5 t. k1 r& O+ `, j
|