/* called by: entrance ctrl of the object 'track'! l4 H1 @+ U$ f) z
*/
: {- P Z7 f& b$ x( A+ ris
6 e; J/ ]2 ]1 V7 [( \+ R9 n. L part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 t1 j2 ]; ~. K1 G4 l7 d
do
) i y0 k. z7 Z0 C9 Y Lan := rootfolder.Internal.Tools.AOLlanguage; X% _2 Q8 w+ ?' E8 D9 k
if current = @.Destination -- else return0 x5 ]7 o9 F7 @- X
then" O. I; l+ C( X* ^
@.Destination := void;
7 R7 X+ _0 k, v/ q if @.occupied then
* D' T+ D+ Y k# j0 H6 e+ a3 D part := @.cont;
0 G6 ~5 B8 H+ X- g4 M2 P+ ` @.transpOrder := void;( ]" n, U) J ?- U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 e& z8 u. A/ t, M+ n' g( R- O0 v2 | S
@,root.eventcontroller.simTime);% ]9 {3 X% Z( N! o" O
@.HasOrder := false;/ e( Z. F# K: z! Z7 ]
@.DrivingHome := true;9 P! ~( e1 B6 V0 }) g9 N9 a
rgManager.tryToStartTransOrder;
0 R: f+ k! u- m0 N0 E if @.Destination = void
: S0 P1 h" Z" k$ H6 T then -- no transport order for vehicle @6 F- G2 y$ v N
@.Destination :=
4 K7 H9 [7 y1 F rgManager.nearestFreeStation(@,track.~);$ |6 E$ m' X# x2 k
newDirection(@);
8 i' p, b. D- H! O if @.Destination /= void then
% R! `1 W/ p( D9 m# \3 w$ b6 S) V: v" J @.Destination.NumReservation :=
1 p5 ~7 L( p$ h1 I @.Destination.NumReservation + 1;
' }7 b7 M4 {! z! z end;
, _ R1 W( \2 M* C @.CurrIcon := "drivingHome";. Q* x8 ~6 m5 Y1 H/ F: A3 i
@.DrivingHome := true;' }0 e( k. K$ G
end;4 Q! w* V* S2 y0 Q. b4 J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" ^4 j' F m* m+ A
part := @.transpOrder;% l4 P; f5 {9 E9 g
part.move(@);-- load part
8 b/ \" n* U% }" o4 x% S1 ] @.CurrIcon := "load";
0 s/ h; b ?" m5 F, R/ H! ` GlobalDistObj := part.globDestination;
- ]8 O- f) H* }% \7 Y assignLObj := rgmanager.rgAssignL;+ X! C! o- k- F' z
row := assignLObj.getRowNo(GlobalDistObj);
. ]7 W- ]* |0 Y6 ~ if Row = -1 then -- since 70
$ f' v y: O1 C. |* G7 D! I if lan=1 then: T. _7 i4 D6 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 m( q* F9 t3 I4 G4 ?: n to_str("in der Andockstation: \"",?.~.name,"\""));, D7 i" ?5 y0 d/ r
else
( [0 G$ I2 X3 S$ U. r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- Z! Y: A" t+ o$ w
to_str("in docking station: \"",?.~.name,"\"")); & s+ t7 M" D! ^/ W& n7 P
end;
8 ]. ?# g X. J, s4 l" U$ N( n; c else
6 H+ m, @4 L7 o& f% S @.Destination := assignLObj[1,row];
" D/ a2 _6 f& Y$ e9 ? end;
& [; m2 `& f- H3 y) E newDirection(@);
6 @% t1 ]7 w$ a5 _ @.HasOrder := true;" l, _9 R; {$ f4 B! F' k7 b) \
end;
% \8 t& V- N+ g6 R end;1 d+ Y% C7 w5 P' O
end; -- of the method9 |; q( v+ k! @( R4 c: \1 q
|