/* called by: entrance ctrl of the object 'track'7 s# D* T! J# f6 C* Y
*/9 o9 g6 t' r% F; O0 u* a- a
is Z. L* G* V$ b; d$ K( ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer; z, C1 I: Y2 z) e$ m9 \/ Q
do7 S: n& ]! T7 Y/ U/ D. i9 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
' K# T. m) Z3 U' G if current = @.Destination -- else return
8 Z3 s/ @) d! Q" p then* S8 w6 z; M" k9 @$ O
@.Destination := void;2 x) [% Z# R( z2 h- D- \
if @.occupied then4 f. ?5 c8 [( n, m1 K
part := @.cont;
; N& `& Z( D+ Y* ?/ g/ D% H @.transpOrder := void;
3 k) y: t. u# X: Y D u2 c {: L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ x) \: g! d- J' D: s ]% o. D% d @,root.eventcontroller.simTime);, }3 V" R% _3 e- m# s
@.HasOrder := false;
& q0 }2 \ q6 R- |: B* L# Y2 [: ~ @.DrivingHome := true;, Q2 X) e1 _7 H% v3 U
rgManager.tryToStartTransOrder;
# k" z3 o [# M9 l$ k. ?" M if @.Destination = void! ~0 `# \. t1 L9 u9 n" l
then -- no transport order for vehicle @) M! M8 a# N6 D, V' y6 l
@.Destination :=+ O0 Z. L2 p$ ]. ?! ]4 @/ L" f
rgManager.nearestFreeStation(@,track.~);
) R) d l3 [' S% Q4 F* z y newDirection(@); $ W( P. h }1 H8 K) }$ `
if @.Destination /= void then
% T4 T8 j7 b+ \8 O V$ a2 C: T @.Destination.NumReservation :=
: o8 L, J7 Y0 ]) f# _) Z! j4 U @.Destination.NumReservation + 1;
, B4 W' n" Y1 {1 w end;) A0 m4 S/ W+ d X6 R2 J
@.CurrIcon := "drivingHome";5 m! z; c' s" M E; o5 \
@.DrivingHome := true;8 [# v! q- x2 I# @0 ?1 A# D0 i
end;
! D! i* O3 z4 F. F* _# G; p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 v9 M. Q+ ~4 u part := @.transpOrder;# J x8 E/ E/ }! E9 s* e# |# r6 [
part.move(@);-- load part
+ l, _, `5 S# K9 j5 ~6 U @.CurrIcon := "load"; o7 x$ C$ \6 n8 y+ s0 i
GlobalDistObj := part.globDestination;: _3 @1 E8 t. Y/ b' R
assignLObj := rgmanager.rgAssignL;2 ~5 |0 T/ U7 }/ d
row := assignLObj.getRowNo(GlobalDistObj);
+ Z1 \4 O4 r; L* @9 t9 ]3 C8 i8 } if Row = -1 then -- since 70/ {. L$ X0 \: v; s8 \
if lan=1 then' H# Q4 J) G" q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 n5 L3 u0 |9 N7 j. K- N to_str("in der Andockstation: \"",?.~.name,"\""));
' a) ?, V# h0 |& w* Q' i8 f. Y else
! s$ g) m9 c) b2 | P# } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. i% v% M* e( j( P' `8 W0 p to_str("in docking station: \"",?.~.name,"\""));
$ y! S2 X8 d. P7 K4 ? end;
0 _2 p( S# j t. G/ x* U else2 M2 O3 [- V% l; v1 S2 w
@.Destination := assignLObj[1,row];- ~ r6 R* r' M' L6 ~; V- H
end;
8 ?7 M1 g3 _3 ?/ E' J/ v* V; h newDirection(@);# ^) J3 U& ]7 F1 a2 Q' E* Q5 o9 F7 Z
@.HasOrder := true;
8 u! E# ^, } j3 o end;, o$ H5 }# L9 A+ y5 w# r8 y
end;
2 `& L) ?9 N6 b; d/ Z' L4 O: Send; -- of the method
1 d/ b9 F) G' i' g |