/* called by: entrance ctrl of the object 'track'; i7 m* }: z3 B, ]
*/# O! H Q) W" ?0 @& F, L5 @/ |6 [
is- C6 A0 X/ J+ Y: M0 a' c5 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 x' w& R9 I8 ^. e4 J, Q5 Sdo% _6 D: E; _ x: M' ~: j" ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
- R3 t S, [6 r; F9 K, O% \ if current = @.Destination -- else return9 F. n' S" @( i1 H/ y
then
( v4 p# _7 i/ R( Z7 S5 k @.Destination := void;
, s8 |7 F5 i% ^! ] if @.occupied then
3 C" m- h% c9 Q$ p3 a part := @.cont;
+ f x- b8 i5 u: k5 c2 h @.transpOrder := void;. z) |( R/ a' S I0 j. n5 Z* O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' f6 [: i! Q7 X8 ?( H" O @,root.eventcontroller.simTime);
( x% F7 Q; v$ i5 Q& m) z @.HasOrder := false;
, Q/ z1 e7 E& z* d @.DrivingHome := true;1 [6 r! w% k' W) Y" i K8 ~3 `9 b8 v
rgManager.tryToStartTransOrder;: S$ y# k* Q" L- R" m5 t/ }
if @.Destination = void" s% _1 c4 I* A- ~% O
then -- no transport order for vehicle @
; X: E/ A- @" N* v$ B* ? @.Destination :=* `5 H. J/ z! b7 c2 X: a
rgManager.nearestFreeStation(@,track.~);
! v, G1 i. F. |$ l N+ x/ R newDirection(@); ( K6 U X8 Q+ s, ?1 j
if @.Destination /= void then
7 ~7 q# R6 p' W7 K6 M# a" d @.Destination.NumReservation :=! m1 D" O0 w- r
@.Destination.NumReservation + 1;
. A& F$ B+ t9 N5 V; w5 d0 o end;8 r2 K7 ~( f- T5 `
@.CurrIcon := "drivingHome";' N* [+ X, t+ ~ n6 Y
@.DrivingHome := true;( J. R. P" P5 l% a& [, A! ~+ [% K2 ^
end;% d. B! W# j, g5 r3 Z$ E% l$ N r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 e0 T# n1 K* D
part := @.transpOrder;
% {, T. n! c4 g R. ] part.move(@);-- load part3 {- A& E1 ^+ p6 K
@.CurrIcon := "load";
; N4 l: q0 u) S GlobalDistObj := part.globDestination;( @, U2 o2 x$ o6 t: v
assignLObj := rgmanager.rgAssignL;
9 l2 ]- b) ^5 A. Q* ~" i row := assignLObj.getRowNo(GlobalDistObj);
, N1 w: U5 W; t3 w5 ^" u) S if Row = -1 then -- since 70
3 V7 p4 W g0 p2 T8 `- [- u if lan=1 then
8 e2 ]. E% b1 w; W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 r; J# B2 ~0 z9 |+ S to_str("in der Andockstation: \"",?.~.name,"\""));7 _! A+ y+ X6 O& }$ o
else
3 G) ?, t4 U1 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ v- |7 @% x; o1 g! a R0 N
to_str("in docking station: \"",?.~.name,"\""));
3 U. y! p* i- j/ `% v end;1 B# q* K$ b; B7 T# j6 u
else9 T- Q5 v1 q* N C3 n! |! G) c
@.Destination := assignLObj[1,row];) X6 l1 o( U% u. L4 o) T
end;
* y+ E0 @* p2 Z4 ~- a% h- `: Y0 ^ newDirection(@);$ I- K( z- I6 b) ?
@.HasOrder := true;
) O2 K* P, \2 I! ^" o end;: ^0 {1 Q T% J5 t6 y$ {, l- g
end;" J4 d) @4 [5 V7 a3 p( u9 f" k% R
end; -- of the method: h- p* Z# q. v
|