/* called by: entrance ctrl of the object 'track': N; j" k! R8 Z, E$ w, m: X) ~* n6 T4 M
*/
5 p7 L# t% I7 E" wis8 j+ g* s& g- @" {0 p% \' V7 M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ J6 H0 G/ S/ P v, B' ndo3 J: v- k* o% M* I) \# Y, q* ]" H7 |+ G
Lan := rootfolder.Internal.Tools.AOLlanguage;
! f$ h' Y) Z+ u' }! N& A if current = @.Destination -- else return# F5 H- L9 h6 J; i( Y- s$ d) G8 F
then
4 D Z) A6 z% N. E2 U1 G9 w @.Destination := void;4 T8 |0 c& p8 x3 s
if @.occupied then
8 L2 T' s b) ^) ` part := @.cont;1 P/ g$ a m: G
@.transpOrder := void;& n' _! I: W7 V2 C! [+ w; J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. N) K( N3 d% x* R p( Z; e# K! C
@,root.eventcontroller.simTime);. p N! Z# L: J6 w8 m
@.HasOrder := false;
5 K' Y9 }" j: z6 q* z5 q( o @.DrivingHome := true;
6 l- f$ j8 Z, R+ y rgManager.tryToStartTransOrder;
+ E' M( h3 [6 P5 ]' v' U9 } if @.Destination = void3 m7 @& R- e. K1 s! R
then -- no transport order for vehicle @
* M, g4 o N+ C+ g7 c* q6 |5 J4 U @.Destination :=
# y8 ~# J6 Y; N# H. a rgManager.nearestFreeStation(@,track.~);" {% H* l4 U( Q, a3 k8 f
newDirection(@);
! H3 @/ c L0 d$ P1 o; L$ i if @.Destination /= void then
3 B( k* `/ J6 W8 R @.Destination.NumReservation :=
8 j9 ?0 g& r8 R! Y% f0 |5 ~ @.Destination.NumReservation + 1;
) _1 C# W- k$ L: ` end;/ E: t5 C' T2 h
@.CurrIcon := "drivingHome";- }) g9 Z3 z4 ^$ x: }
@.DrivingHome := true;
) e& [$ G- b: r end;
2 [+ B; ?9 ~9 X# t- |4 M! D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" ?( X5 W, g6 L7 P$ R% d part := @.transpOrder;
% w; \: ]# ]5 a( p! z part.move(@);-- load part
5 o2 R' R9 F& L4 Q) ^) k( u! z @.CurrIcon := "load";- ]/ H3 l( ^9 B
GlobalDistObj := part.globDestination;
) a: h5 I: G6 j4 |+ h3 L b0 e" v assignLObj := rgmanager.rgAssignL;$ n0 o) j/ b# b4 t# @
row := assignLObj.getRowNo(GlobalDistObj);+ N0 p$ x# o b, n
if Row = -1 then -- since 708 U6 n! S8 w6 M! c
if lan=1 then+ q; i8 N: o2 Q4 D0 [- j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 e, D- o" u, k to_str("in der Andockstation: \"",?.~.name,"\""));1 E( @# o5 ]% x; A$ {4 }
else
4 ?0 W( Y3 G; G4 d4 T- ?3 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 D( f; r6 J6 a1 \6 h* r# g# r! \3 q* P to_str("in docking station: \"",?.~.name,"\""));
* M1 b6 B% A$ A# _2 }. t end;
8 e9 J7 U6 n7 H else+ k4 d4 B) M8 D$ C/ L. C& b. |
@.Destination := assignLObj[1,row];2 L* c# R8 j- [4 a6 ?) _8 U X
end; 3 W \6 }2 t! y; {+ j2 L
newDirection(@);
3 F( I: b1 E, }5 N. O @.HasOrder := true;4 [7 V% `$ [5 B8 L
end;% U* w$ ~, a6 t( q# l6 k# K
end;) q, _" q$ @, g' x
end; -- of the method% w' X0 U3 o$ p* b; W c
|