/* called by: entrance ctrl of the object 'track'
' m; L/ ]: Y$ z*/
! B' s" Z7 ]; o2 |is
. G5 ?- {; B1 m! \ b B part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 h* F: x1 p7 h# J. W1 }
do
. S5 s5 k. F) V: A& J V! v Lan := rootfolder.Internal.Tools.AOLlanguage;( U4 C9 J, f- V9 p* e
if current = @.Destination -- else return
! c" H" A' F! J# [8 q5 Y then6 d$ u4 E( t/ q& ]- U7 V G$ t
@.Destination := void;& Z8 x6 a& N2 S* @# B
if @.occupied then& Z0 u" N4 @. S! L- a
part := @.cont;
3 T" h+ j# T% j$ X @.transpOrder := void;, U6 N" a4 q3 H# @+ R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% v- j4 u7 N a
@,root.eventcontroller.simTime);
h x" m$ j7 {1 [( Q/ H @.HasOrder := false;/ o7 |) u W5 I8 I& L
@.DrivingHome := true;" Q) W8 @1 G' Y {; w& J* M
rgManager.tryToStartTransOrder;
# ~+ m" S# c, d% ?( \ if @.Destination = void
- o& C: f, o4 V then -- no transport order for vehicle @
# o+ W1 J' X5 C, {; R! Z f( @ @.Destination :=
' `' s9 S* X# I6 l+ s rgManager.nearestFreeStation(@,track.~);- x S+ ~" B1 Y
newDirection(@);
* i. y: A: j- q" i! h9 }! N if @.Destination /= void then
# |0 v% g3 U% |4 w, h @.Destination.NumReservation :=- v8 h# x2 i+ a# u& v4 }
@.Destination.NumReservation + 1;
% e1 Z1 N. ^8 R" z+ m `, t end;
1 c% ^' _% f/ _* i$ V1 J @.CurrIcon := "drivingHome";9 s, ?6 I1 r. t& D/ s
@.DrivingHome := true;: i; m& z) ?% u0 x0 p K4 f* @; c
end;
/ c. ]# S. k( W- E; o else -- the vehicle @ is empty, both vehicle and part are in the same dock station; d0 p0 n+ Q( Y2 B* O7 ^5 o
part := @.transpOrder;
M6 e0 w$ w2 }9 X7 \ part.move(@);-- load part6 p8 M9 b8 ]4 A3 r
@.CurrIcon := "load";4 i& h6 P; I- n1 ^3 [' Z
GlobalDistObj := part.globDestination;, l6 }3 T: f. v) ?: s T
assignLObj := rgmanager.rgAssignL;
6 Q1 z2 Y ?+ s row := assignLObj.getRowNo(GlobalDistObj);' _" Y" s; U9 v! ^
if Row = -1 then -- since 70# b1 f; {: U! {) U$ |# w* V" o
if lan=1 then/ B6 e9 p, m3 B" y' ]. L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 i, D Z5 K3 I1 f' ]) Z
to_str("in der Andockstation: \"",?.~.name,"\""));" n/ U" i0 m% I3 G. ~
else
, o1 q; K7 z; z. V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' S4 ~/ s2 C+ [2 W( L to_str("in docking station: \"",?.~.name,"\"")); * {. z! Q+ t: |2 F+ A
end;/ ^8 w* o/ B0 ]# y, `4 O8 ?0 m
else8 p8 P5 N& H* F/ e \+ S+ m
@.Destination := assignLObj[1,row];; E `3 Q) D; {' i' S5 Q; L
end; & D$ d9 e; n% p+ L
newDirection(@);9 Z( I+ |6 {0 Q( n4 }% N" a$ J& k
@.HasOrder := true;
, [) o% Y* d! C" B! Q end;8 @# B: ]' t( p
end;
" H. \2 j4 w3 ~- X a1 `3 Q6 }end; -- of the method6 r# J2 M4 v% _' ` n- U
|