/* called by: entrance ctrl of the object 'track'; p% J9 s1 e) d% B( D3 ~
*/
* B* l, V* Q$ J U F/ Fis
6 s, ~+ y; ]3 M3 A' g5 c8 R& n part, GlobalDistObj, assignLObj:object;row,Lan:integer;! m! m r5 b4 k( p
do
( U0 D% X t3 M. n0 n Lan := rootfolder.Internal.Tools.AOLlanguage;
$ f) `- V7 e% y4 Y6 g) P2 j' c* o if current = @.Destination -- else return. `8 `% B9 u/ N* n" F
then/ p9 s/ Q+ X" |( K" u% n/ d
@.Destination := void;8 |1 t+ E1 ^6 ]
if @.occupied then& x7 A+ O1 I: g: S
part := @.cont;. E" O. ]9 B- _0 v0 e
@.transpOrder := void;
$ s* D4 l {' e, H4 v) D+ J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 u" V/ f8 @ L+ a0 R& w# i
@,root.eventcontroller.simTime);
" w: o, s. H" V) c2 v @.HasOrder := false;8 }6 R* u7 t& h% j/ _% N
@.DrivingHome := true;
" I: o( y {" H' x rgManager.tryToStartTransOrder;
8 L/ m W: e h2 w if @.Destination = void
4 u* C! u4 R6 M then -- no transport order for vehicle @; d3 x6 B7 R: u2 Y6 Q! W
@.Destination :=
- | U: G5 r% M rgManager.nearestFreeStation(@,track.~);
& A& {/ b2 ~, K# ^, y& _6 C1 b newDirection(@); ! Y5 V3 ^. k: _ n3 ]
if @.Destination /= void then% q9 M O. n3 v
@.Destination.NumReservation :=
- p0 E9 B5 u" B" {2 l @.Destination.NumReservation + 1;0 D ^1 E. V0 @0 Q
end;# X: Q" O7 F/ ^4 J5 u0 s# ]
@.CurrIcon := "drivingHome";- M j9 l1 }' Z0 }, ?/ {
@.DrivingHome := true;' a7 F5 e# w2 X/ H
end;
! K" N; L# _* t, V else -- the vehicle @ is empty, both vehicle and part are in the same dock station- {- P2 P* @1 O6 b3 x' U+ T
part := @.transpOrder;
0 K" |, q1 B$ k. e2 q$ ] part.move(@);-- load part, T3 x. e+ m' U
@.CurrIcon := "load";
4 B- z+ A8 \7 E6 j/ | GlobalDistObj := part.globDestination;
- p' K |/ ~9 e5 { assignLObj := rgmanager.rgAssignL;+ f5 E7 ^- t5 a
row := assignLObj.getRowNo(GlobalDistObj);
/ s) M7 F. s! `$ Q if Row = -1 then -- since 70
& G; K- f) I, Y- Q! U ~' F& c if lan=1 then
1 t; J7 x0 b. G& q- f9 M+ n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 Z3 h6 c, p* M9 P: N to_str("in der Andockstation: \"",?.~.name,"\""));
( T. m* h* y0 K4 D p else
! C2 v- _* c8 ~" N b- d5 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) I7 V) Q A7 i# b& V: S) Y/ C to_str("in docking station: \"",?.~.name,"\"")); * L/ \- W. e% Z
end;4 Q+ P& N. P% v/ B% D1 o" ]
else9 }! U4 s$ }2 E1 B( K# m3 q5 Y/ L
@.Destination := assignLObj[1,row];
& A0 M! r& B) s5 F$ N/ z0 _' p end;
9 B) y5 W6 a" O1 h* u newDirection(@);
U5 p. J: _% Q( k- f @.HasOrder := true;" _. T* [$ {5 U2 |8 `8 x9 `
end;! h4 X- j- t) o3 c3 w
end;4 z: s' K9 d) \
end; -- of the method; {) P! ]' i4 J
|