/* called by: entrance ctrl of the object 'track'2 k1 U) E* o, x
*// t- X2 o6 h# Y/ m l6 R
is+ {7 h+ n8 U8 s/ V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ f! |6 L1 l: X. y6 {do, h, ^$ n% A; U v
Lan := rootfolder.Internal.Tools.AOLlanguage;
. k7 V2 } u/ X+ m8 c* Y& S Q; B if current = @.Destination -- else return6 ?: H- f' O' k R2 B4 T
then
8 C( e. ~ T# u+ ?5 G$ y @.Destination := void;
2 K5 r0 ^$ t5 Y: Y/ s) x# l if @.occupied then: W* |% m) J; b9 Z% I
part := @.cont;% R" ?: m# W- k1 v9 Q2 g6 y
@.transpOrder := void;" ]6 _3 u5 w' X0 ^/ L1 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
X4 q# z, X0 e- w7 F) x$ ]6 h, A @,root.eventcontroller.simTime);0 ^# b" x4 l S* k
@.HasOrder := false;
3 A$ c) a* C% C( W% n: e! J8 k2 n# ] @.DrivingHome := true;
1 C$ O% a/ d0 h% @. m! u6 _ rgManager.tryToStartTransOrder;
; L$ x; n& L7 B, v( f if @.Destination = void$ W& q; k# X2 @3 Q1 h: n
then -- no transport order for vehicle @2 h6 V: Y1 G- B' w
@.Destination :=
8 D, P! Y( t& b% r2 |& k) ` rgManager.nearestFreeStation(@,track.~);
5 C5 M0 M w% x; \% n* `) O newDirection(@);
+ w& _! Q& @1 q; x/ \ if @.Destination /= void then; g. p7 G- `7 k4 o% w
@.Destination.NumReservation :=
e" \! k/ P! l; T3 \9 v @.Destination.NumReservation + 1;; q) {0 x, w1 h8 J9 T$ S
end;
9 @6 N$ w: | b# `4 h. C6 ?% M @.CurrIcon := "drivingHome";
# F; u2 W% r3 i& P% i @.DrivingHome := true;* A% z8 b5 q! ?% p2 l: J [) J1 |
end;
, b+ c' e. l$ `* E, m else -- the vehicle @ is empty, both vehicle and part are in the same dock station) f& p B7 ~& H: M$ [2 X
part := @.transpOrder;1 P* }6 h5 O5 }- y; B0 g
part.move(@);-- load part
4 i, K0 J% Y$ ?3 g* [: S @.CurrIcon := "load";8 z" u+ t, ], X1 L% J
GlobalDistObj := part.globDestination;& c, S* f3 K% G3 R: X! m" r
assignLObj := rgmanager.rgAssignL;
4 {: \: `5 h, x row := assignLObj.getRowNo(GlobalDistObj);
5 [& ?; v5 }9 g5 m if Row = -1 then -- since 70: @4 P' H3 Z5 H5 I ^8 p6 p- C
if lan=1 then y# l" X( x2 ]. v' ?3 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! |& ]# }$ C4 x' Z) W to_str("in der Andockstation: \"",?.~.name,"\""));
0 m$ f/ H9 ~/ r# q" T5 c' ^' o else
) C }" r9 f8 j; w3 r2 a: | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# U; D$ r. c% I to_str("in docking station: \"",?.~.name,"\"")); w9 v+ c4 y4 n, z
end;
5 @3 k8 R* m/ p else! a* I2 D' k. Q1 D0 u1 b
@.Destination := assignLObj[1,row];$ `2 |# F. i4 V Q$ j5 K
end; S r Z9 [; X& ?' {+ f# a
newDirection(@);
T) H" @# g% `; ^! i @.HasOrder := true;& A% [% [6 u2 q: x
end;$ d- I2 F# f: S0 |. A+ K
end;
. U- Q4 P+ w- Eend; -- of the method
5 M7 {% I+ z- n2 K- w |