/* called by: entrance ctrl of the object 'track'
4 y2 u- U; R1 }8 ?; B" m*/ c: `: V1 v# G% z* \
is
: p3 f' D: I2 i, ]+ c part, GlobalDistObj, assignLObj:object;row,Lan:integer;, l, x3 ^' N4 z k0 B1 D( I# x# w
do" R4 b" T* O. I+ E; d
Lan := rootfolder.Internal.Tools.AOLlanguage;' O, O9 T. Z6 `' ^, P
if current = @.Destination -- else return
% F6 H" k3 A7 w) Y/ [$ h C& k then5 O) u+ A, M( K( u6 G
@.Destination := void;
E+ x( @' S2 U% @& }; ?; C6 w if @.occupied then" J) X4 s# ?) |% @/ k% B* G& A2 ~. D; }
part := @.cont;
7 T: R- U; X* d, c% O- T @.transpOrder := void;
* H% h2 }) x$ C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% ^6 _1 u4 d6 O
@,root.eventcontroller.simTime);
, Y0 t' q: J1 y; A) Q7 t @.HasOrder := false;# Q4 e0 u0 q, W& X3 j
@.DrivingHome := true;
' }- _# h% @' T- U0 M rgManager.tryToStartTransOrder;
* }! u0 T E+ u: U; d if @.Destination = void* e! {4 {2 V: o5 ]4 u- c
then -- no transport order for vehicle @0 j, \# L3 }$ E, L7 |7 ? Y! X
@.Destination :=
* D1 v6 s' n, i. P rgManager.nearestFreeStation(@,track.~);9 s, b* E' T+ A- _! g
newDirection(@);
; Z; z) y! q2 e$ W if @.Destination /= void then/ ~+ H: A5 j) E# @
@.Destination.NumReservation :=7 d" b" X& I' R
@.Destination.NumReservation + 1;
9 N1 N1 d- X i9 N8 { end;0 P9 d: a( G0 M1 `0 D/ \
@.CurrIcon := "drivingHome";6 K6 `4 I; I) t. g$ c
@.DrivingHome := true;9 B7 l4 D. b; P6 Z- F& `
end;+ T8 Y }) Z4 X( @2 Z' e$ V W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- `! O; @5 t# J) A- y- ~ part := @.transpOrder;
( I. O2 S7 F7 l$ r3 A9 A part.move(@);-- load part
$ L$ L3 |+ c0 u: | @.CurrIcon := "load";: ]; x) o ?! t4 B% v: P2 K1 X" O
GlobalDistObj := part.globDestination;
0 Y5 m u& U! _ assignLObj := rgmanager.rgAssignL;+ d4 x" p) g( Q4 H+ ?9 e% q5 s
row := assignLObj.getRowNo(GlobalDistObj);
$ v8 a- m/ C' z0 U' y if Row = -1 then -- since 70
9 x7 Z' q @+ y# j, j/ V if lan=1 then6 q8 ~3 B# U2 G. Y9 y0 \3 e- p3 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* H( l Z+ Y' v# v to_str("in der Andockstation: \"",?.~.name,"\""));& f$ w/ F+ h$ j: o5 y! O& X
else; j$ M* B$ h: o$ v2 p z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 U/ f8 A) m. _1 c+ a
to_str("in docking station: \"",?.~.name,"\""));
% H( B. C8 s' b- q end;# m7 d+ {2 J9 y3 K* }
else) O9 ~; M5 P* v5 h/ ~ N3 Q
@.Destination := assignLObj[1,row]; a$ X0 y' ~$ B) V4 R
end; 6 U K, _7 e, \1 S2 C+ q9 J3 ?
newDirection(@);
. W4 }! l$ u8 z) F& h( U3 S# y+ F @.HasOrder := true;
( [0 }3 q" u0 P1 [3 z( o end;
5 N2 p& W2 t3 f9 S$ h( p end;
' D3 k4 ~$ U6 c; K; Nend; -- of the method
' ]5 _* W( y: H) W- z |