/* called by: entrance ctrl of the object 'track'9 l8 i1 w2 R$ [
*/0 j: Z: P) r% w8 _) m0 X; f
is: x; F: r1 T7 f1 M& p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# `# s3 @7 e) Q# [
do# {5 k* D( R# u7 ]6 o6 `* G
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ e W" T) N' g, r2 k( y if current = @.Destination -- else return8 f% h9 ]) t" \: N/ \
then
$ t( [5 F6 [$ N5 @ @.Destination := void;0 @, }1 t; i+ R1 D9 t: U
if @.occupied then/ _ T! {+ L1 I$ h
part := @.cont;2 v! w; E) x; F7 m/ N
@.transpOrder := void;
$ w3 b- H$ u+ v& |( l! n8 H/ w8 ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 O( D5 _1 Q7 U8 x2 x$ g @,root.eventcontroller.simTime);: \3 E# W7 H' B& [
@.HasOrder := false;
$ W) y) u' W6 F% G5 x4 e5 }0 A @.DrivingHome := true;, S- T# k4 l4 ?' R0 P
rgManager.tryToStartTransOrder;
! t2 V) g5 R( q4 R0 ?3 H8 _7 K if @.Destination = void! c8 W' o2 ]# N- t0 ]* G' K
then -- no transport order for vehicle @
, e ~' Z7 g& o @.Destination :=
2 j; S+ T7 R6 L rgManager.nearestFreeStation(@,track.~);7 h1 @ U! Z6 U! q$ `; |; M
newDirection(@);
5 P! j& m, {- p* X: F% h- F if @.Destination /= void then
7 W! V, T1 O; n# i( f: t+ f @.Destination.NumReservation :=
2 K& k/ D i# i, X) \; ^ @.Destination.NumReservation + 1;2 k8 z& W; X& t) q
end;& B! U' ^4 \: h- m
@.CurrIcon := "drivingHome";9 o$ I5 g/ W4 r8 {$ A: v
@.DrivingHome := true;
: ~ b( `' O* r7 l: T end;
) X3 K" W* W% M6 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 i, q7 Y: m# {9 z, }1 \8 f part := @.transpOrder;
! u/ D% X- k) I7 ?, a/ w! D part.move(@);-- load part; W5 N m) l2 ?2 w* w- ^" b
@.CurrIcon := "load";" k$ h0 G% l: o% L# l2 G7 X
GlobalDistObj := part.globDestination;
" |: z5 g# _2 f4 s5 _+ C \ assignLObj := rgmanager.rgAssignL;* \' M0 M& }1 A# ~. ?8 R, x
row := assignLObj.getRowNo(GlobalDistObj);! g& N1 x. j" s& `
if Row = -1 then -- since 70" f H9 R8 a2 O
if lan=1 then
, Z3 Q6 l2 a# q4 @7 a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ]$ g' I: Q0 ^& B$ U
to_str("in der Andockstation: \"",?.~.name,"\""));0 O% h. J) O# ?
else v" X4 T0 G$ a) b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ G7 J0 Z: T+ b8 K, A* M5 r
to_str("in docking station: \"",?.~.name,"\"")); ( O) ]' u2 i8 u4 Q- y9 I' R8 e
end;
$ s. V& r0 J$ m else: @8 l+ r9 J1 N s! d
@.Destination := assignLObj[1,row];1 C! X7 u+ R; n- Z$ t7 Y/ e
end; 0 H" E+ X: `0 t/ v6 y
newDirection(@);0 r: y2 b5 r/ B; G8 X# z
@.HasOrder := true;( J5 B; q# v! F; ?& g
end;) Y6 Z+ M, Y: h) j( q( P
end;
; v- z6 r; J/ S9 |( m4 v, c7 n4 K# hend; -- of the method
) b) R4 ~; N. \9 M g( k6 J8 Q8 M; U% U |