/* called by: entrance ctrl of the object 'track'3 K. [8 L( S I# r+ C* |
*/* o( c4 w0 }/ R+ T
is
F ^. \- o" J# E- S9 ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 d# ~5 _6 }4 ]$ S. M3 ^* D
do
$ F9 S9 m4 z- X) p2 k" [% J Lan := rootfolder.Internal.Tools.AOLlanguage;2 P ^( V) p @
if current = @.Destination -- else return
! d1 }" W( h& t' u then
; r! ~2 W" j. T* |9 A7 F# h @.Destination := void;( ?5 c. t4 s( z* G; n# g/ @
if @.occupied then
5 I; s# J" b: U( [6 E5 H part := @.cont;# Y/ R0 h. l' J, t2 n
@.transpOrder := void;
$ d! x/ h8 s* W, h0 O }; u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ O% r& Q# ]7 R! V$ E
@,root.eventcontroller.simTime);
0 g8 K( x$ ^/ }8 l. }1 C7 O% j @.HasOrder := false;
' n6 i0 l' ^( Q" Z* K( y9 n# c b, Z @.DrivingHome := true;3 ]; a, V1 N5 s1 o3 x& ~4 @
rgManager.tryToStartTransOrder;% t1 E0 _+ G# R) y5 U3 x
if @.Destination = void
% ^+ p, S% L7 @: B then -- no transport order for vehicle @
) t. D- Z0 D5 R. s1 ]5 H, f+ ^ @.Destination :=
- t5 u. C5 g6 A7 x* z5 ~: A rgManager.nearestFreeStation(@,track.~);: C0 T4 a6 N& z6 ?5 I1 C9 \
newDirection(@);
8 W# e; B% G9 m7 ?9 V a. W if @.Destination /= void then
3 B+ B. z1 c: a7 a2 A* \4 W @.Destination.NumReservation :=
* w3 A6 g: E. i1 \ @.Destination.NumReservation + 1;
. g# | G5 ^6 v4 C2 Y+ t0 Q end;7 d% R7 z, P0 ?& q, K
@.CurrIcon := "drivingHome";) p# z6 b* o3 {- o* J4 z
@.DrivingHome := true;/ \2 a4 J" t5 B+ @& u l
end;
) b$ e4 t% g: `3 K) b else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 \! a g* }+ q/ f
part := @.transpOrder;( Z$ U* u% z0 [! a$ D2 l
part.move(@);-- load part @6 Y& z. } A7 P+ ]
@.CurrIcon := "load";
" U! R8 b7 D7 u; Q# ] GlobalDistObj := part.globDestination;7 m/ F$ \. e' j+ `
assignLObj := rgmanager.rgAssignL;% Q7 d5 W$ J6 ^3 d9 @5 S" l
row := assignLObj.getRowNo(GlobalDistObj);3 E% N+ u! B) F D/ t _ ^
if Row = -1 then -- since 70
% i: a9 i) \/ O4 g4 d if lan=1 then% x# C' u% j. c6 W( t F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& O9 D8 S6 v' I5 C
to_str("in der Andockstation: \"",?.~.name,"\""));# O3 ?4 ~% x- X. i: |
else
! i& q: o w" n1 e0 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* w* ~1 j0 s) _ to_str("in docking station: \"",?.~.name,"\"")); + a# m3 P" J$ r6 L) J( |
end;3 x1 a/ x2 c% T+ ?. V
else, ?/ ?7 j3 E: m |3 G8 ?: ^3 ?. U
@.Destination := assignLObj[1,row];
, |7 p$ g: {5 e: h end;
2 Q2 n7 J' I, I# z# T3 V newDirection(@);% K9 g2 G @1 X4 w, r) l: T1 [9 o
@.HasOrder := true;
. w) P$ ?* A0 Z- N end;
6 |. ^6 Z' ~2 H& ^1 U1 S) f b end;
6 h( D" V j7 Q" W. c% Send; -- of the method$ ~1 G( s: v0 t& w, R( e
|