/* called by: entrance ctrl of the object 'track'
& h" x+ h ` B( s/ e% q: {*/
) u' T! C9 v; @) x/ r) j, y- T. ~; Dis$ m8 l" G3 b/ o. L7 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. O9 `" d0 @3 S. p8 x2 \do$ O% k3 u7 A# N0 J
Lan := rootfolder.Internal.Tools.AOLlanguage;/ \# q5 R: ?) C7 a% z
if current = @.Destination -- else return( b0 J* B' t* f$ y+ k
then8 l3 ?- |" |) ?% f* E4 Z
@.Destination := void;' R, H) l8 W; R! X. v: @ \
if @.occupied then. F2 h% D3 @3 U: T, `
part := @.cont;
6 j/ ?* [* G8 B, R1 d2 O @.transpOrder := void;
: o% A; E. k! r( |; K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. K( D# z4 Z6 q; x5 C @,root.eventcontroller.simTime);1 ~% ^( i9 u) j# I: l. D! T
@.HasOrder := false;0 j+ g6 f" R( Z G u- i; X% x4 Y' S! e
@.DrivingHome := true;
* {, M, H4 Q& c( R; | rgManager.tryToStartTransOrder;
* p$ Y3 q) Z3 R* W) n' v% e if @.Destination = void
( n! W- m8 f9 t1 E# W+ J then -- no transport order for vehicle @
9 a' |, A) b* K0 g& p2 |3 F; `. x @.Destination :=
+ [4 k. o$ E3 Z8 R2 k* h" ]5 X+ G rgManager.nearestFreeStation(@,track.~);. q& ]/ N% `' X) X$ u6 `
newDirection(@); ' _3 Y' h, k" `& ?0 R& j3 N+ ?
if @.Destination /= void then
7 O7 |; @ N- a' T/ D @.Destination.NumReservation :=- F# ?$ J! D6 R' b! w: m; f
@.Destination.NumReservation + 1;- F: f- c- S n6 m9 g9 Z2 m
end;2 {0 n4 v L5 o. z0 Q# N6 ^
@.CurrIcon := "drivingHome";
- v1 A% K& H# U. T @.DrivingHome := true;
4 r4 j4 `& J6 l( \- c& J end;
8 d* ~/ e2 o+ ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ y: K) ?& E9 b1 G6 A3 o" Z part := @.transpOrder;
9 Q; R, n! ?+ p part.move(@);-- load part; C. q* A8 Y3 I0 _& r
@.CurrIcon := "load";
. c5 F* ]# K- O9 ^' o GlobalDistObj := part.globDestination;. w% K; p* V. u8 P0 ?5 a7 T: y
assignLObj := rgmanager.rgAssignL;
& H$ H) c0 j% R4 C! z) y row := assignLObj.getRowNo(GlobalDistObj);
& P3 }# `( e4 ^' H6 }- d if Row = -1 then -- since 70
( q+ b5 ]: z, l; U9 I& J+ U+ p if lan=1 then- O' i& O2 L& q5 C8 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: Y! O; m1 W& h( C# p
to_str("in der Andockstation: \"",?.~.name,"\""));. h! k! d, F5 E" U# W
else2 b4 n1 e( c6 r: A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ G; b! d9 U2 B4 l+ ~) t$ I2 C
to_str("in docking station: \"",?.~.name,"\""));
) K" c: c+ {* p: H end;1 @" A# P1 k5 v7 M7 F3 K( s
else+ R- h& G$ @8 E5 ^6 e# _& z9 S
@.Destination := assignLObj[1,row];2 s1 k6 p- n- X% t
end; " u* ?7 f& K0 t- ]6 ?
newDirection(@);9 e* @9 T' m! N
@.HasOrder := true;4 t* \% l+ t @- V
end;
8 M. \! E7 ?& ] end;
1 e1 m: g( s' G# Send; -- of the method Z, y7 B' ^& L. _+ q- e
|