/* called by: entrance ctrl of the object 'track'
) l1 a) `. v9 ~2 B*/* c0 m( h$ L" [* c4 ~
is, B# T [8 C. l3 r' a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" o( `, j& O$ ~# y" C2 K7 `, [/ edo* r6 P4 b6 L1 C* j, I/ t( g
Lan := rootfolder.Internal.Tools.AOLlanguage;
: n; H K2 I, E8 g {& ^* Y if current = @.Destination -- else return9 A n/ y3 s8 S: {, B) @
then6 F" |" Y5 B# X" Q& h
@.Destination := void;- t% P* T* b3 ~$ l/ Z; h5 V! d: f
if @.occupied then
# z3 I! W2 n/ k8 I0 B part := @.cont;
6 Q( L3 r* ?' T @.transpOrder := void;
. v8 ]" W0 p, Y2 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% }9 N8 ~- h$ ?% j& ~
@,root.eventcontroller.simTime);
; S& h2 D( j N& \ @.HasOrder := false;
: \9 Z( A' ]5 X& {& @( [ @.DrivingHome := true;
7 a: `8 E$ e0 L5 m rgManager.tryToStartTransOrder;/ _6 t: L5 Q- V& X1 U: {
if @.Destination = void# c- _5 A/ d- V9 A5 A
then -- no transport order for vehicle @
2 A. e' F' o: f/ b# V+ F! ? @.Destination :=
6 }% M3 h$ {4 n8 Z rgManager.nearestFreeStation(@,track.~);" e" v" j! p& k8 g+ t! |7 ~) m
newDirection(@);
) h. R5 y7 `- C- V9 t/ j if @.Destination /= void then
. r: ^) {& @8 g @ @.Destination.NumReservation :=
( F D% Q- V9 \) R$ Y8 s, Q @.Destination.NumReservation + 1;
8 P2 R- T* |! n! P. r [# R end;
/ ^1 F7 }. C' b U, k @.CurrIcon := "drivingHome";! U1 c" Y, w3 U- h7 ^8 B
@.DrivingHome := true;: H. p8 Q* h- Y1 ~3 @
end;% S! p9 s' P' |3 {2 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. e2 u" v/ e+ G- N" ]/ Y. D
part := @.transpOrder;
2 X3 G& m' U+ G1 O9 ? part.move(@);-- load part
. G- H; D) h8 f+ ] @.CurrIcon := "load";- _/ D9 Z u6 U3 o
GlobalDistObj := part.globDestination;
6 C% Y) C0 R4 S2 H. T C assignLObj := rgmanager.rgAssignL;1 K) e: `, }2 e5 ]) @
row := assignLObj.getRowNo(GlobalDistObj);, Q' h% p& D- D: E! p
if Row = -1 then -- since 70
! ^8 T2 q- D( h, l if lan=1 then
+ r6 k' J6 x, K3 p1 _7 X4 T: } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 S7 s8 R8 G) O2 C% ?+ O to_str("in der Andockstation: \"",?.~.name,"\""));
S* t" n4 O" k* J3 r6 p0 Z2 |8 O else
% ^2 F, c9 D5 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ `* H* S, t0 s2 e, w to_str("in docking station: \"",?.~.name,"\""));
, P8 O9 T8 D7 e3 F, H0 i v# ? end;
& J, G/ F8 `, N, F' h else
1 q: Q$ d: E. D. B$ [ @.Destination := assignLObj[1,row];/ l( |8 o% c9 g# ]1 f7 L
end; " O7 F* t1 b* I4 e
newDirection(@); Y4 W5 { J" m( |, E8 H" V
@.HasOrder := true;
3 `( m4 p4 O) H' Z end;* j6 [% ~" R/ h
end;
+ O( n, f- O( g8 M+ ?8 xend; -- of the method
|8 }# c$ y+ {3 m( e6 w# ]& A |