/* called by: entrance ctrl of the object 'track'
, Q% A! @) l6 a+ T6 g. G*/
; }% X. ?; f1 ~ |is
& K. A- `$ X( j8 ^4 G! |- i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 D! m( W$ J" ~7 Q! C* odo
9 g' H) Z" S8 K k7 I! r6 Z Lan := rootfolder.Internal.Tools.AOLlanguage;! d; R) d/ R( C/ F3 Q
if current = @.Destination -- else return
/ H9 p" m, W7 Y# y; m then
* N2 g2 I) c U) P0 J) T7 ] @.Destination := void;
% V; K! V/ i+ A8 q, w7 ~ if @.occupied then* f) [' f' i! Q8 J Y& [
part := @.cont;
1 `" a3 r* h. r" ~: I @.transpOrder := void;: s4 o$ }+ _6 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 L: a1 T$ Y0 _$ U5 L9 a* I
@,root.eventcontroller.simTime);
& w; s& A% d! v% E. ^' q. m @.HasOrder := false;2 P5 J+ A* e7 \( D4 t1 Q
@.DrivingHome := true;1 O! Y- R, ^. `0 X# }# f! x
rgManager.tryToStartTransOrder;
& _" Y) e/ V% g# y' M( t* X if @.Destination = void9 y$ y4 T/ ?5 c& u8 r
then -- no transport order for vehicle @
% l# Y( S. }. E- e @.Destination :=* Z3 a. ^& s* b4 d' j
rgManager.nearestFreeStation(@,track.~);
2 t1 E/ W' z+ g& @) w3 j$ ]% P8 ^ newDirection(@);
1 @+ M2 l2 |, u1 T( |; v" |/ y if @.Destination /= void then
$ ^( l5 K; ?" d, j# _8 K @.Destination.NumReservation :=/ G @5 r, y) s
@.Destination.NumReservation + 1;! M* U5 Q; y1 p! u3 W
end;' N; D) g0 G! ^* ?# k/ W* Q
@.CurrIcon := "drivingHome";9 R; q f5 o {2 y. d
@.DrivingHome := true;1 m! \( x, \- ^ `& L6 D
end;: R9 m, r2 F5 c+ T3 z6 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) G8 c* |' {4 ?* W5 [1 d8 }
part := @.transpOrder;9 m+ f/ c7 B- l/ _4 e) x4 ~
part.move(@);-- load part9 ]% c: |9 j' M3 q
@.CurrIcon := "load";* |; x5 Z' S$ [4 Q
GlobalDistObj := part.globDestination;
/ ?% X6 s( E% t3 i4 j: R# ^7 N assignLObj := rgmanager.rgAssignL;0 v) B5 G9 o5 t+ ?& k
row := assignLObj.getRowNo(GlobalDistObj);
; Q( v( t* Q, a$ Y" `$ s1 L if Row = -1 then -- since 70
% v5 ~8 A( e% k5 Q! ?# ? if lan=1 then
+ J) b+ z" u; }" a" r, | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 f2 m& f4 _2 g- m ^ to_str("in der Andockstation: \"",?.~.name,"\""));
$ V4 V* q& R1 y$ F else
: W: d, E, {- d& ?% [6 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* `& n7 q6 x* Q! h
to_str("in docking station: \"",?.~.name,"\""));
8 T- K `' J- X9 X/ H end;, G5 Y. q8 F9 \/ }' f7 F
else
, O3 y) n/ O: o0 k3 M/ u8 P7 | @.Destination := assignLObj[1,row];
" j9 Q6 `9 H3 F& [7 }. y end;
1 N2 M) c2 | \+ m8 o, R newDirection(@);
2 x4 U6 w# v8 B, G& G" ?7 S @.HasOrder := true;
f$ ]& I' C5 S4 { end;
9 }/ I8 ?& t+ @ end;
8 q ~: S- G0 L( m( }$ u0 E4 w `end; -- of the method1 S$ h6 \; a. H0 J
|