/* called by: entrance ctrl of the object 'track'
- W* X# k4 x8 n8 h*/
" s9 Z$ G; _+ }. H! Q5 {; ois2 c4 p( ]$ }! t; n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& F4 q# u8 S: S+ _do* T: G& v+ a+ ~1 |- Z, {9 I
Lan := rootfolder.Internal.Tools.AOLlanguage;8 s, j! n+ r6 P5 e
if current = @.Destination -- else return, c8 D( ]8 M, \+ e0 O p
then7 Q7 s. q2 ~- B; ^2 `( h' l
@.Destination := void;5 m" V+ q |# A! t
if @.occupied then
6 A, H& ~4 p( W" Q2 ]8 ]" {& T part := @.cont;
* G7 O- |7 J" Y/ D @.transpOrder := void;
0 S- S- P# ], ^. f3 {- d3 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 U$ J0 o# t4 l6 ^. [- F4 ?! E% X @,root.eventcontroller.simTime);2 V+ r5 e: j# |# K% O, c
@.HasOrder := false;( p: {+ u' Y( G6 y: O- s" ^4 ^ S
@.DrivingHome := true;
, x! f! }, S/ ?# p6 \ rgManager.tryToStartTransOrder;
: v) j( G- z2 E8 ^2 ~5 K8 @ if @.Destination = void
, g6 f4 T, v( j: k0 X then -- no transport order for vehicle @
9 d9 `( }2 S8 O @.Destination :=( \, @" K: ?8 A g3 t2 h2 E' p
rgManager.nearestFreeStation(@,track.~);
9 K2 t$ p+ g1 J" ]& P2 {; O9 y newDirection(@); . p v; O' ~( O, \# K' b' }
if @.Destination /= void then( l& `) g9 f0 P' R: ?" o4 f
@.Destination.NumReservation :=
2 D4 n$ {+ F. [! n0 S# r* m2 G. Z @.Destination.NumReservation + 1;. D" ^. o, x N
end;
' `! G0 @ D: O. k& w0 x* O: s @.CurrIcon := "drivingHome";
8 E* n5 S! }6 \; I @.DrivingHome := true;
* K3 L3 ~( c: H end;
1 C. I% k& @5 T6 k% k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ Z9 t1 j8 y. {; }4 f1 u part := @.transpOrder;( D* A) A: y) U0 A1 |. A! x
part.move(@);-- load part
& M% _. C3 o0 H! ~. l @.CurrIcon := "load";( A, |! m. j' ^' Y
GlobalDistObj := part.globDestination;1 V! ~7 Y ]2 S% ~2 l- |' Y3 v4 i6 D
assignLObj := rgmanager.rgAssignL;+ b0 C6 ], k3 d) w( h& }2 A8 b
row := assignLObj.getRowNo(GlobalDistObj);
" X- s8 p, `; |- I8 b \ if Row = -1 then -- since 70$ a# q1 ]5 N/ f) f( e
if lan=1 then/ y& z, m( `& `; h8 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
z2 W9 G7 b/ j. _2 X- w2 P to_str("in der Andockstation: \"",?.~.name,"\""));
" u! n0 U) N6 n8 d `, F else
- d5 P. L% L' V; W, { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% D7 J ?4 h, J1 d" p4 C$ N5 j
to_str("in docking station: \"",?.~.name,"\"")); ; S, Z2 E3 X& g; ]7 ^
end;7 J9 S ? Y' y2 [1 g* Q
else
; N: U. a5 p. i" z @.Destination := assignLObj[1,row];
: k, }- B4 n: x j" f/ A& O5 B* U end;
! A u& y9 H) c% k# L" C$ @ newDirection(@);
# E$ R# e8 g% ~ @.HasOrder := true;0 D1 b! B9 e& G _1 E) H( @( P
end;8 ?8 ]2 i+ c# k0 m
end;, W# F! X9 l$ B: x
end; -- of the method @' t& H( ^% j9 C2 h1 i9 {
|