/* called by: entrance ctrl of the object 'track'
# s/ b/ c* q. a; E$ T*/" n, x# d1 |- G2 S
is0 X' b# D8 H( c: T% d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 P9 d r3 g' B* C) h
do1 K5 Q* D4 V3 e: w: f# P' p4 F
Lan := rootfolder.Internal.Tools.AOLlanguage;, q8 O8 {% w& d8 N" d8 B: O* j
if current = @.Destination -- else return6 ?, M. J, @5 H9 ?* C8 e( O2 N8 V: K- }
then
: Y. S4 j+ N! y5 ^5 f+ @ @.Destination := void;
3 ^% ^6 w( [2 I3 b8 C! p& w9 I if @.occupied then
, r; J! ^3 N9 x* o# U part := @.cont;: K& A0 s# _% [
@.transpOrder := void;
! Y# ~. ]7 m1 t. Y7 x% I( H! P' | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ T2 E4 l8 @9 s5 W8 {1 z
@,root.eventcontroller.simTime);; H0 `& [- @7 b6 \4 J6 P7 t
@.HasOrder := false;
, {2 [$ J7 U S @.DrivingHome := true;8 i$ n; O$ y. y0 d4 J
rgManager.tryToStartTransOrder;
, e; M$ K9 }; x3 i if @.Destination = void
: _9 a3 _/ d' ]$ j; _ then -- no transport order for vehicle @
! \4 s$ J" G" b/ J- r1 h @.Destination :=
6 \& s6 V% Q R9 v0 Z rgManager.nearestFreeStation(@,track.~);. a. ^8 [# B5 B% h& y9 {6 Y8 [* |9 q
newDirection(@);
9 E G4 B5 p( u3 s if @.Destination /= void then6 J7 I9 A/ U* G4 P
@.Destination.NumReservation :=
3 q( c/ C- S6 l# f2 ~ @.Destination.NumReservation + 1;$ I9 G* F+ p7 g: n9 M
end;0 O9 ^1 N, j+ Z. J
@.CurrIcon := "drivingHome";5 n$ _7 @2 | I. W8 y
@.DrivingHome := true;
9 X; y5 |- t& O3 y7 [; g: b) z! r end;
& {0 m/ H3 @7 {# Z, Z7 Y% w R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% c3 s# E/ Q8 [8 l! h" n' r part := @.transpOrder;3 s/ q7 O8 |8 P$ \& _1 h
part.move(@);-- load part7 e" a" g% H' n% o( Y8 ~; p
@.CurrIcon := "load";
+ r4 R- v, P2 m8 ^. F7 ^ GlobalDistObj := part.globDestination;4 {* y5 X8 Y% _/ ?5 q! g$ R; u
assignLObj := rgmanager.rgAssignL;
0 W9 s8 d# w* ?$ o row := assignLObj.getRowNo(GlobalDistObj);
5 C, t; _' D, t$ S4 I( T! N0 O( M if Row = -1 then -- since 70& p' {7 u% ?9 n* r9 |: m5 S
if lan=1 then/ ]; n. Q) z$ p$ [/ t/ M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) u: E+ ]$ b6 E0 }" _ to_str("in der Andockstation: \"",?.~.name,"\""));
7 J% ^! N0 V9 ^- E: p4 a else
+ W; J$ H7 f7 h4 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, l' t5 }# O' n" U, y to_str("in docking station: \"",?.~.name,"\"")); 7 ]" C O& H( ^+ y% y
end;
: l7 U& W- F$ O3 n( y7 d else
8 ]: \1 |7 m- ]8 y1 y @.Destination := assignLObj[1,row];8 {' W$ a4 N5 G
end;
4 W. |; K! r2 H* o6 b; f9 h" z newDirection(@);) A/ N& [% b1 q5 _
@.HasOrder := true;
( R" v; i% H9 X, g0 E6 c6 t end;& a) ]2 m# G# P) I
end;6 i+ Y1 ]* q# [5 ?3 I- M0 O
end; -- of the method. i2 j0 y1 A, A% o) h0 j6 ]/ g
|