/* called by: entrance ctrl of the object 'track'
8 ?: G2 c: X9 l; o5 s( d, M& h. J*/' T) K# b/ f9 _# O, Y- d) }8 ^
is
" _; i/ n2 h! F. V# }- U3 E1 o2 ]$ Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! [1 N8 Q6 T+ d, j- u( t. X. ldo
& P) N' v" S# H Lan := rootfolder.Internal.Tools.AOLlanguage;
' J. P, L* v7 @) h$ M9 s0 D- U5 K if current = @.Destination -- else return
1 u4 d o5 a2 M then$ w) f Q. |4 M# b
@.Destination := void;
' D4 l$ q( G& S" c1 n" L& O if @.occupied then. C! T) e! n$ M
part := @.cont;
1 |/ r! E- H3 r. R I% [9 v @.transpOrder := void;( Q9 J# l7 X( `6 G0 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ J" n" U& Q1 F @,root.eventcontroller.simTime);2 r& h# l5 [5 I8 v4 h, e y
@.HasOrder := false;4 u6 v1 B3 O" `" H A3 A3 k% A4 n' O
@.DrivingHome := true;
3 l; y: S4 [/ d rgManager.tryToStartTransOrder;
/ \" \4 h$ L/ L if @.Destination = void
) }8 p7 ~0 l- Z then -- no transport order for vehicle @
1 e. d- k, Z- c @.Destination :=
$ J! t& m7 \" L; C) i( W5 m: ^9 z9 v rgManager.nearestFreeStation(@,track.~);/ F: ~8 V/ k4 h7 @- o+ M T
newDirection(@); & S# B# A9 J. K% j! @+ z
if @.Destination /= void then3 k2 y3 e$ [" ?2 `
@.Destination.NumReservation :=4 w; L; D4 m, G( M+ [
@.Destination.NumReservation + 1;* l' e/ M. {; S! [* Z
end;
( m8 ?! H* g1 w2 m; N @.CurrIcon := "drivingHome";& ]: y6 ]# c8 i) c3 s$ E9 S- i8 t! [
@.DrivingHome := true;6 K0 f7 j- [) N$ `8 f
end;+ d& \" G! k5 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; d1 ^( N% H3 c+ ^$ q0 l: ~ K
part := @.transpOrder;
% M$ x1 E. B- _* |7 h5 ] part.move(@);-- load part
! m; q! I: n$ b- n @.CurrIcon := "load";
1 O9 E' W" ^# W) v* u GlobalDistObj := part.globDestination;
: W% c5 ]4 l. T1 p0 R; G assignLObj := rgmanager.rgAssignL;0 g0 ^( D3 ]* j: g0 V# D. V- x2 W5 E g
row := assignLObj.getRowNo(GlobalDistObj); ~5 n, i8 C3 o% p3 I
if Row = -1 then -- since 70
7 x. r! N U/ G% A8 u+ p4 M1 n! L if lan=1 then
; z9 G- E# r2 H Q5 ]4 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! } [& K, @6 `7 C0 U
to_str("in der Andockstation: \"",?.~.name,"\""));
6 h: i, i& Z8 t6 F; O, D3 G* ? else
* F8 R( o4 y4 k% i" u0 t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; H, R+ |6 @8 w6 G! c to_str("in docking station: \"",?.~.name,"\"")); " V* T5 t1 l- {! {! o
end; h7 n( w3 B; ?1 q0 O
else
) y7 _3 e0 j |3 ~1 ] @.Destination := assignLObj[1,row];1 w5 A( ]# E- s& Z
end;
: M& v+ w5 H+ Y% c1 U newDirection(@);
) z# X6 t) F; y i# ^+ {9 @( _ @.HasOrder := true;9 H( M# a/ E/ ]
end;
2 g$ }& l* P' [9 B8 W: q! Z) k end;" R$ Y. o$ g0 k# m. X/ _
end; -- of the method. U6 b4 ?# @% \% f0 Z: b
|