/* called by: entrance ctrl of the object 'track'5 f7 @3 [8 ^. N$ ?
*/$ {( }, m3 T: H
is
, x# Q% o* O; a; |3 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 Y7 ~4 | i% b. k, k- h7 c
do& ^6 c( B" L) b( y8 E
Lan := rootfolder.Internal.Tools.AOLlanguage;4 D2 i6 O7 k* m* O9 l. `2 U) R
if current = @.Destination -- else return X- p. V, ~* d2 y0 t- O
then
& \* t/ F- _3 L( w5 K/ k @.Destination := void;
; h& x6 Q) u/ M! V0 w if @.occupied then
2 f2 v ^4 }4 e0 t part := @.cont;
4 V9 u! y/ s( f4 J0 H; V$ P& v" i; }7 V @.transpOrder := void;
# N: y: a2 c# T0 H& w5 x, E) R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* k$ E' m0 Z$ r+ e3 E9 \. o
@,root.eventcontroller.simTime);! Z2 m5 T- f0 j0 ]( Q3 f2 t' U
@.HasOrder := false;
) Q" w# ^% |% Y% C* f! l @.DrivingHome := true;0 r5 B, y& w$ }
rgManager.tryToStartTransOrder;8 {2 g$ c& n: H, z1 o
if @.Destination = void
E, W# z2 G6 j' ?& U then -- no transport order for vehicle @
' R8 S& _4 T: O- h% B% F- ` @.Destination :=
T2 F; \, t! q- J1 J3 ^" q, ] rgManager.nearestFreeStation(@,track.~);
/ u# [( t' Z" B. F9 q {$ E( }2 n3 I newDirection(@); * p/ @1 C, `3 s* s# S
if @.Destination /= void then
& g- } S8 O* ]( E( J% f3 k) |& h9 L @.Destination.NumReservation :=) R0 k# f1 v; M9 n9 W6 T
@.Destination.NumReservation + 1;5 E/ E8 g, A+ k
end;/ j) R* y; k" Y
@.CurrIcon := "drivingHome";; H) Y& D4 R4 G3 [
@.DrivingHome := true;4 r. f- {% u1 K [9 m* t
end;
& {* @$ G/ e4 e1 P else -- the vehicle @ is empty, both vehicle and part are in the same dock station, [- c |# s+ a
part := @.transpOrder;4 B* d' V; F$ u2 n/ D+ T4 }
part.move(@);-- load part
3 Z5 s2 Z Z: t' L- F @.CurrIcon := "load";
) O+ V. d2 D4 N5 [9 D GlobalDistObj := part.globDestination;! p6 i8 [- e; e; j, X. d
assignLObj := rgmanager.rgAssignL;
7 F, u* |$ m% _6 P7 ^7 _ row := assignLObj.getRowNo(GlobalDistObj);
& U4 p, G! |1 X( ^8 z if Row = -1 then -- since 707 [3 I& f5 O7 ]& F5 \4 \( N
if lan=1 then' ] w2 H! ?2 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! a6 L$ C- [7 A* q. k
to_str("in der Andockstation: \"",?.~.name,"\""));
Z/ ]; ^4 @: \7 P1 M else8 G- p; ~6 J' _0 ?( _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 K9 t5 v, n+ C* G6 w
to_str("in docking station: \"",?.~.name,"\"")); ; e/ k4 J- x$ \- h3 V. j
end;4 G- @9 W2 Q0 P$ y
else4 e7 M$ o, W$ f" y( H' F
@.Destination := assignLObj[1,row];0 a2 m C9 q( Y6 G& A" [! }# u
end; 3 [; b9 A8 F2 ^. k& ]2 S
newDirection(@);
/ {+ o/ E4 ^* y/ w @.HasOrder := true;6 o* X/ z2 m& E$ r# C8 A
end;$ N4 O# @% s8 ?5 @( q& T
end;! ?4 C0 Z; }# U( f
end; -- of the method( N& N; J% |( B
|