/* called by: entrance ctrl of the object 'track'. S! K7 t0 Z' c: D! F3 S. U$ [
*/, @0 U9 i4 V# P5 C8 X8 |1 g
is
4 W, w: N$ Q' n( O# \! ^) } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( e2 S1 ]+ G, C* `2 A% B9 ?do3 m# ]% u1 `0 f9 F% i
Lan := rootfolder.Internal.Tools.AOLlanguage;: |* w) f- l! `# R9 e
if current = @.Destination -- else return- u% \2 z+ Y: C3 y* g. M/ s& }8 K
then
3 y6 r. Z( j& M8 C4 R) c' H @.Destination := void;
5 r* O3 X) c* R" O, j% [0 i if @.occupied then
% }4 ~2 L: f$ d) Z2 P, ?0 h4 E f part := @.cont;# a3 |7 n$ D$ E& [: u
@.transpOrder := void;
5 x+ ]2 D6 w' }# g0 M) t* _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 T S; C& Q! e @,root.eventcontroller.simTime); ~9 q: U/ X# K+ m" p
@.HasOrder := false;
: m" R: I! _& i* {; ~ @.DrivingHome := true;
: F2 k( B1 ^3 k8 t1 Z rgManager.tryToStartTransOrder;$ G5 L* ^! [; v% [# S
if @.Destination = void4 ^+ Z% f8 P$ e( |: H2 B
then -- no transport order for vehicle @
, |% y# n) M& C. @ J @.Destination :=$ e" g+ m: v& v0 |8 m
rgManager.nearestFreeStation(@,track.~);8 m7 u$ e& w# A
newDirection(@);
) _( n8 z% f$ T4 l) P# J: J. ]. N { if @.Destination /= void then1 O$ u! c9 b$ f+ _' k) X2 s# j
@.Destination.NumReservation :=% W1 g) B3 d8 x' V: Y3 p' X
@.Destination.NumReservation + 1;$ {1 K/ J( {8 ~6 F# H3 w W: W5 O
end;7 f6 U, W1 k# F4 Q1 X5 W
@.CurrIcon := "drivingHome";0 q& t4 P: k( w
@.DrivingHome := true;% J- Q+ c* ]$ ]8 T
end;( ]7 V; F: N- |) r3 \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station ]2 l- m5 L2 y; {
part := @.transpOrder;
5 \% C! M l \( o part.move(@);-- load part
! q3 ?; u: l- a' |1 {3 H @.CurrIcon := "load";. m8 M2 D1 F$ Q; U3 L! K4 v# ] q
GlobalDistObj := part.globDestination;
: G- g# F8 Q0 c) Y f( F' l4 s assignLObj := rgmanager.rgAssignL;7 u; A9 n$ ^0 _3 G7 W x$ T
row := assignLObj.getRowNo(GlobalDistObj);* R& J' _9 R- u5 b, F
if Row = -1 then -- since 70
+ Z$ k5 P& w' H6 p: Y if lan=1 then
( ~) |! v1 T# h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- E. U8 y, k, `6 _
to_str("in der Andockstation: \"",?.~.name,"\""));$ @7 E7 i0 ^, y5 D$ b! \6 }
else
# F- T3 O. v/ S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), [6 @# I* N f8 M% D$ s
to_str("in docking station: \"",?.~.name,"\"")); ) I6 [- R& n, [2 S D
end;# Y) N4 j$ `0 N( X! {; z
else
8 ?, D+ H3 x, z @.Destination := assignLObj[1,row];- x! D# d/ q8 X" g6 Z j3 i
end;
, M+ k1 F" Z0 G! N! h. y newDirection(@);( v6 ~) D! n" e1 b
@.HasOrder := true;, l3 s5 V' g- Q3 i5 f9 r4 L1 a& O. j
end;/ X4 H0 r: @5 y
end;
3 x' P1 D/ `* r2 l5 |5 U$ pend; -- of the method
8 c6 m% I2 s! m0 v |