/* called by: entrance ctrl of the object 'track'& O" K* q8 O& W, r' K
*/
?; `8 a! J/ g- c1 H. I3 Pis8 B9 E; O8 I1 X1 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 I) ^: E/ c) }' v0 R6 }do
3 X [& h6 ?8 J1 _" u2 W Lan := rootfolder.Internal.Tools.AOLlanguage;
+ m D. ^, p! G if current = @.Destination -- else return) I: D. H; _7 Z* D, j
then
5 N! n0 O; w+ `' Y6 t @.Destination := void;6 C& d. s6 s6 V& i6 t+ z! l5 Z- P
if @.occupied then
$ Z& p7 X; L2 B- @3 f9 K part := @.cont;, \' p) o9 v' F5 v0 S- y
@.transpOrder := void;" Z8 Z0 e1 S7 w% g. D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% g9 G- l, Q, `+ E: \/ ` @,root.eventcontroller.simTime);# H0 K: D% r) ]
@.HasOrder := false;
$ T3 ?$ r+ J5 F' }6 K @.DrivingHome := true;
: ]6 z7 L9 P1 M; j# t rgManager.tryToStartTransOrder;$ l* ^3 w$ g- b. b( c
if @.Destination = void
9 }1 [4 e; b; w then -- no transport order for vehicle @
. q& `5 v* G2 A5 b' D @.Destination :=
: Z0 f3 j8 k$ P, f rgManager.nearestFreeStation(@,track.~);5 A9 ]/ |% \: d+ ?+ j
newDirection(@);
& f$ @+ x4 W# G! S, g if @.Destination /= void then3 P' C" g) X* O1 [- J* @2 u( x
@.Destination.NumReservation :=* F+ u ?7 |* I7 c4 {0 V
@.Destination.NumReservation + 1;
, S+ t& x# X( v7 | I# q. o5 W# f end;
+ S* K! Z- O5 k( F# h @.CurrIcon := "drivingHome";; M3 Z' D0 d" t, B$ Z C
@.DrivingHome := true;
7 `- O, n/ M' U/ p! @# O end;
* v' C4 f6 L* `: }! F7 ~. z' I! f+ E else -- the vehicle @ is empty, both vehicle and part are in the same dock station, V, D" D- w! u, O9 b' _$ {6 O Z
part := @.transpOrder;
r. {9 W- y3 L" c# f part.move(@);-- load part
1 a h- ]7 ]1 n$ F& b- w9 ~8 {3 C; _ @.CurrIcon := "load";7 v8 C- s P" v8 ]( B) E
GlobalDistObj := part.globDestination;
# i+ w4 Q& n$ j' U: k assignLObj := rgmanager.rgAssignL;8 C, E' m" ? W9 P1 w" ?$ T- ?
row := assignLObj.getRowNo(GlobalDistObj);3 k2 p( O0 Y4 N! T" @+ j
if Row = -1 then -- since 70
0 [% f! C# d6 o4 i! \/ C4 ] if lan=1 then
: z: A, G; k* N9 w- [8 l1 ?: @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
t4 Y, `; C5 p6 A to_str("in der Andockstation: \"",?.~.name,"\""));- d, Q4 ]) A2 V+ X
else
5 c6 |8 R, x8 T0 `! z: u; b/ W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: q' J! z* p& g( Z% R0 Y* L
to_str("in docking station: \"",?.~.name,"\""));
: K& C$ s0 I; N% i0 u end;6 r" ^+ E8 g' {) A3 S
else5 c/ D# q7 c0 f; q, Y. w) ^% d" E- k
@.Destination := assignLObj[1,row];7 E* S* _) L' X1 b' d- m0 _% K
end;
0 W1 F6 L3 @4 H newDirection(@);
) C. n. B' G) S; M# x( k6 E( D @.HasOrder := true;
2 Q3 [+ `/ m% {6 T5 { end;
1 M5 e7 |; w, K! e9 B3 S end;9 b6 G9 h5 O1 ~( K. y
end; -- of the method, z3 w+ T9 F- B' M9 d) F
|