/* called by: entrance ctrl of the object 'track'- ]3 ?- E9 n) M$ m, ]8 I
*/' D! ^, e% c$ j5 Y
is0 a/ S0 g# |% m+ ~- m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 |4 C1 {6 {' ^) ?7 \' Qdo) f- h7 K! O- M4 E
Lan := rootfolder.Internal.Tools.AOLlanguage;# b1 ~& J* p: ~& `$ }
if current = @.Destination -- else return
% O' N y; e4 o* L" L! _$ V9 m then
" Z/ n4 L+ q7 e+ w0 z6 l7 n* _ @.Destination := void;; L- J# g. q3 `: r+ I" g
if @.occupied then! P7 U0 y7 {; w9 \# _: ~
part := @.cont;) G) \& x' s5 \( T
@.transpOrder := void;1 x7 }6 ?; K2 b& }9 M& F& S8 `6 _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( \3 a7 _2 G$ B
@,root.eventcontroller.simTime);
8 Y! H1 F J" m7 R @.HasOrder := false;
: h* l# w2 u p7 V: T9 [- Z @.DrivingHome := true;
+ ^9 I) @' }2 ^" h5 @3 E9 | rgManager.tryToStartTransOrder;3 [" t7 I2 F# R+ ]2 Y
if @.Destination = void! S' @3 V4 M# j* p
then -- no transport order for vehicle @
F) V- Q; x2 g/ V; D7 t( l" w' E; X @.Destination :=
* t4 Z" T: ] ?2 _* Y rgManager.nearestFreeStation(@,track.~);+ _- {$ u0 C, c
newDirection(@); ' ] c( R8 Y9 s* {" H
if @.Destination /= void then
/ Q4 e, N; G; z( T4 L& M6 o @.Destination.NumReservation :=0 B* Z5 o; y# `+ L" F
@.Destination.NumReservation + 1;
) z3 p% ~: _2 _ end;
( X9 E" C$ d8 n- K# l# V T9 f( V @.CurrIcon := "drivingHome";9 A6 X7 k6 ]! ^/ m
@.DrivingHome := true;
2 o# }+ m' Q3 L! ?* e7 R- F end;
- s: k) I% w7 c- p6 j" C else -- the vehicle @ is empty, both vehicle and part are in the same dock station: F$ |1 E, f. G* E- h. l
part := @.transpOrder;
* `5 t) E5 Z u/ |- d4 p# v part.move(@);-- load part0 r. _( _; ] l$ C, F" A7 b
@.CurrIcon := "load";
9 |" h: ]( e$ H4 k9 [ GlobalDistObj := part.globDestination;
3 z$ ]& A; E2 O9 ^1 C assignLObj := rgmanager.rgAssignL;6 |6 P& X q$ R2 ?+ u8 }! o, k
row := assignLObj.getRowNo(GlobalDistObj);
9 o$ G4 m5 J+ Q3 Q3 x) p% H if Row = -1 then -- since 70. ^( L' q' X6 h. K5 f) X
if lan=1 then
& [% l) H1 U5 e% V5 Y) r& u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! c" ~; w/ L" @
to_str("in der Andockstation: \"",?.~.name,"\""));* k0 b' Y) B! i* g$ B5 ?
else
, b; N4 v% H! ^. y0 Q* g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 Q) x' x& p! D8 k( t& O" c% a& V to_str("in docking station: \"",?.~.name,"\"")); 6 j) a+ U h8 O- d/ k7 h
end;
+ H0 x" u0 M0 O) \; j0 r! G$ F else4 ^7 v5 Y3 i* x) K5 a4 c' E/ D
@.Destination := assignLObj[1,row];
& {( C( F! s0 y# n8 f ^! N end;
: F" a$ {# @& W: A: ?2 ? newDirection(@);! k1 a2 s1 `4 e7 u f
@.HasOrder := true;1 J$ h" K' Y- O% l8 B: M
end;
7 A9 u! A) ]2 W1 r9 Q& b/ p end;
$ @& L& v8 b& x6 Lend; -- of the method
" V: W Q# q$ {& t% i* I$ D! Q g6 W: T5 u |