/* called by: entrance ctrl of the object 'track'
0 o* n: X' u' w ] c! P*/
1 }9 f; x$ c9 `8 H* X9 L( _is, V( ^. j! p, P9 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: l/ V4 D$ q3 W0 bdo
9 }$ H& U. G/ m7 T$ d) r( V1 S7 Y r Lan := rootfolder.Internal.Tools.AOLlanguage;& E8 j- P6 C; `) k, O; ?
if current = @.Destination -- else return9 e* H/ W* w2 U& o
then& R7 Q5 j' j4 w( c7 i# U
@.Destination := void;- T" V4 W: U2 _6 a
if @.occupied then
9 l. m0 r6 J4 F/ P! `6 m part := @.cont;
) s/ n! L3 r" C4 l4 B/ n @.transpOrder := void;6 ~* }& g) u# }, o/ `1 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! `. |& n P6 _5 ~. o
@,root.eventcontroller.simTime);( K& A4 _+ \! }9 v! v: l$ ?. l3 a( Z
@.HasOrder := false;
+ f! q2 h; }) Y" L @.DrivingHome := true;' |* i, S7 f3 U
rgManager.tryToStartTransOrder;9 }4 q( T- Y' I" v3 N+ y
if @.Destination = void
( q8 Z' X9 |$ k9 i# ^3 i then -- no transport order for vehicle @9 o8 t4 X E6 r9 l/ v0 p+ D8 a! f
@.Destination :=1 b0 y( H$ w$ {( J$ G$ v
rgManager.nearestFreeStation(@,track.~);* k z( t/ D' s% c; X% S T
newDirection(@); ' F* E9 q5 w0 o% B+ j* k5 J4 W* B
if @.Destination /= void then: ^/ Z, I. u! Q8 a9 ~
@.Destination.NumReservation :=
0 N5 m" m8 {; J- K, z @.Destination.NumReservation + 1;
6 p$ M2 K' b" Y. l1 Y end;$ a7 B- `1 {6 N/ P" u) O6 A) N
@.CurrIcon := "drivingHome";* C' T+ L6 o! @
@.DrivingHome := true;
; g" F4 a" y. t4 N: @4 V: V, @ end;6 |6 i. s5 g! t8 F/ y, \1 G) s ?6 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: a+ h6 _ T; X4 ? part := @.transpOrder;
+ j+ g3 C: {& E0 E+ E1 i+ t0 O part.move(@);-- load part& E; ]% W# z. w% ~0 ]
@.CurrIcon := "load";. q: F0 _+ y, d# B. v
GlobalDistObj := part.globDestination;
* p# S+ J. o! w' r assignLObj := rgmanager.rgAssignL;/ \! `, p" E; m" a4 r
row := assignLObj.getRowNo(GlobalDistObj);
" O9 Z/ j5 B. U% F J if Row = -1 then -- since 70* H4 D0 t6 ~. v, z0 a) A/ R
if lan=1 then
_$ G+ W! H# I4 a9 s* B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) |8 R% G; S" m" t
to_str("in der Andockstation: \"",?.~.name,"\""));6 b3 w9 `2 F ^" [
else; T$ E" }. |) f; m" E6 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# f! h+ n6 S0 a! {
to_str("in docking station: \"",?.~.name,"\""));
( [" g4 p* _# L2 l; n" z end;' C$ v" j6 b; g1 k) m
else
. D9 D6 v7 k1 P6 U- A @.Destination := assignLObj[1,row];' i" D3 X& s) E* u7 [, S
end; 6 c3 _+ B% E* A0 V- p8 b9 w( J
newDirection(@);& R' w+ [ h! e: t& r2 Z6 e
@.HasOrder := true;
( ~: a- J7 q" l+ }4 ?/ y/ U, v" \/ f end;3 r- F2 C9 v) Y
end;9 q& U0 w4 f. Y+ G: N8 w
end; -- of the method
9 j% b& V. r' P |