/* called by: entrance ctrl of the object 'track'
S0 j _) D4 d. F/ b*/
0 O& n4 N. Z2 U. A* v- Gis
6 N, W; @1 ?$ k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, _1 v2 N2 b! B* W$ j& X7 L0 Tdo
: s2 }2 H# Q# d8 }$ C Lan := rootfolder.Internal.Tools.AOLlanguage;
8 a7 M6 C$ b* b @+ M if current = @.Destination -- else return/ M, C* j' t* k5 n. ]: `3 o
then
; b% n2 r5 V( |& [6 Q% z2 \' N1 M @.Destination := void;% F; ]6 |; E) A( l5 E
if @.occupied then; A: R* p8 M( l+ |2 `: ^$ e
part := @.cont;4 l- w1 O5 Y+ y2 q9 K/ C1 F
@.transpOrder := void;6 F% ? C" e6 L* z( C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Z+ U' V& ?/ k N) h$ T7 P2 r5 y @,root.eventcontroller.simTime);
$ [8 d# g2 x- v( l; m0 r @.HasOrder := false;
+ c9 O) q& \) E% S @.DrivingHome := true;
+ u0 n4 O: @5 a* V' v rgManager.tryToStartTransOrder;; t. d: Z) S; K
if @.Destination = void8 m0 ` x _. P& ?1 {
then -- no transport order for vehicle @
0 X% ]6 I2 |9 \- \8 B @.Destination :=, _6 L% ~+ E; C( X: \
rgManager.nearestFreeStation(@,track.~);
5 _. Z8 z8 @4 o1 K& k2 [ newDirection(@);
, y/ K! |- Z0 J if @.Destination /= void then
4 Y( v Z" o3 U* I) c! U/ D @.Destination.NumReservation :=. V/ v. |4 M3 G/ w1 F; ^+ G2 k
@.Destination.NumReservation + 1;
7 h0 r% v' n7 G' s3 V end;
* h" j' @7 }/ K; }/ P" u @.CurrIcon := "drivingHome";$ W4 E% V+ j' |8 Q' e4 u
@.DrivingHome := true;
* _1 F4 K* q8 C& T- ]% U" P# U) ^( A end;* i4 y" a% F( n/ V ^# B. K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 u) v. Z+ ~& W part := @.transpOrder;
% O1 S B1 H7 R* [ part.move(@);-- load part; p9 g6 a' [* M% ` o& l- V" G; b
@.CurrIcon := "load";6 }: n% @8 f9 ?5 v
GlobalDistObj := part.globDestination;
( E6 D( d7 t+ ~+ h assignLObj := rgmanager.rgAssignL;
# g7 e, `- k" P) x: y# L# | row := assignLObj.getRowNo(GlobalDistObj);; n7 @2 _# M) H5 [6 N5 o/ r( y
if Row = -1 then -- since 70- u' [% s4 g9 s; ~
if lan=1 then( N' b& H. u3 ~# M8 F/ ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; y/ x1 z$ h& `3 T" z2 R- d
to_str("in der Andockstation: \"",?.~.name,"\""));7 D, }2 e9 L# G# e
else' V2 e: s2 E7 j+ ]8 y; y% d5 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- D3 m* U' g6 p6 d. P. x
to_str("in docking station: \"",?.~.name,"\"")); ; K' k' c3 K$ S3 _
end;: d( W6 |. ]) Z7 c; \* Q$ v
else( ~) A0 l# `2 P$ L5 k( k
@.Destination := assignLObj[1,row];% ?# p: A7 I- a* J% k* U" p
end; . O8 B" ?7 _* \/ N W; U! J
newDirection(@);" d6 A; [ ]" B( b4 m; r) ~
@.HasOrder := true;
" }# x- ]. b8 C3 @" b6 C2 a end;* a; f! g$ o' d8 B) h% m
end; \9 O& {3 Z- ]* P. C3 ]
end; -- of the method; O$ J, x1 M6 L7 K& X; n3 w% ]
|