/* called by: entrance ctrl of the object 'track'3 U3 `) f2 y! {8 b! ^& J& T
*/7 _" b: t* m# t& s
is
* g4 |9 g1 f8 \$ ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 o$ g: L& _& {! f. Mdo5 S, N5 y5 K3 p' \0 j3 h5 M5 A3 l& A
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 Y6 S0 W; _; s if current = @.Destination -- else return: m/ [: s0 `: A0 n5 d
then0 N3 C7 M9 h, L7 u
@.Destination := void;6 i$ c; b: }9 ]/ G% X" Z$ K
if @.occupied then1 ~" g; q7 q9 s$ V; i6 ^. U$ ^
part := @.cont;& _0 b* m( ?) Z% D6 c. J) R
@.transpOrder := void;' p! N0 M! h& w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 E9 j) z5 b$ M @,root.eventcontroller.simTime);4 h& _* R0 P f0 B% @$ V" ?
@.HasOrder := false;
8 o: ]: r$ W! q# r, m' f @.DrivingHome := true;
) r; F8 E5 @% M, p/ i4 R rgManager.tryToStartTransOrder;
& b0 {5 c6 [, e) y4 X4 F% H* n if @.Destination = void$ U! Z' [ o4 H
then -- no transport order for vehicle @
2 g; f3 w# O( H1 e @.Destination :=$ r# G7 `& f" P O a/ V% ?2 D8 x7 d
rgManager.nearestFreeStation(@,track.~);: _9 N+ r4 H; H% ?7 R
newDirection(@); 3 J. Y# v1 r: ?) _: @
if @.Destination /= void then
- a% }6 s/ d2 L! I @.Destination.NumReservation :=
# f* i3 Y5 l4 o9 V @.Destination.NumReservation + 1;
, f/ M2 L. s) o2 i8 r& E2 t9 s' Y) A end;8 w& K# B1 h& w9 A$ f. B1 ]# z
@.CurrIcon := "drivingHome";* p0 Z/ q8 u e8 N
@.DrivingHome := true;$ ~+ X. {6 ]% z8 x& p
end;
D. C; z3 }" n else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 _0 J: j* R: k0 O( E% r" h
part := @.transpOrder;9 p7 ]% i, H4 U8 H
part.move(@);-- load part
7 y$ }8 g( ?+ ]9 k2 x7 h# E @.CurrIcon := "load";# A9 \0 p4 I N8 Q7 l
GlobalDistObj := part.globDestination;
l& [3 \! C q& I6 f5 J assignLObj := rgmanager.rgAssignL;* u5 o3 U7 v: r: \* C2 U: h
row := assignLObj.getRowNo(GlobalDistObj);
( g) A$ r3 B% x if Row = -1 then -- since 704 H# |7 Z, @0 I4 a- N m
if lan=1 then
. a5 i/ Z+ k# ^3 d" e, X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 L- o( f$ {/ t# L2 X8 s! o u
to_str("in der Andockstation: \"",?.~.name,"\""));: C9 z; \6 [$ W) o' f6 q( h
else
8 F4 q$ o. Q& z/ n7 M1 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ o* ^ ^9 E4 Z2 X8 h q# k _
to_str("in docking station: \"",?.~.name,"\"")); ; Z4 \; k) M: k, u
end;
+ `3 l, k+ Z I$ {) I6 `8 I: G else
6 s! T7 N9 ?. ?( }8 r @.Destination := assignLObj[1,row];
9 N- b+ G& Z0 Y& e8 p' J6 D: W' U end; 0 j% {; ?8 x* x$ {
newDirection(@);
9 N) y+ E5 ]& ?2 u @.HasOrder := true;! n J# ~' e: C: q
end;
: ?/ G0 ^7 b1 a) N. v2 P) } end;
& I9 h( C. q; H- u4 S* ]- P. u; B# uend; -- of the method
& ^) p- M( ^# x4 H+ Z |