/* called by: entrance ctrl of the object 'track'
1 ?( Z. C8 \( [+ o*/
+ Q* O |" m1 n$ vis- L7 g( H2 d* }* i% d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. j3 h7 Q9 G5 U+ J7 ^3 F+ K
do% L9 ^6 x% m- c+ m, E j w
Lan := rootfolder.Internal.Tools.AOLlanguage;9 J5 d; q5 e: `# A3 r+ o
if current = @.Destination -- else return
& ^, E0 n$ S a" [" S then3 P9 X# \, s+ @/ D9 Q
@.Destination := void;
( N \( D% S \5 a2 B% O( n ` if @.occupied then0 S8 p4 @, b8 F) ^# Z# x
part := @.cont;% h& F1 k! i8 c8 Y2 Y0 f9 u
@.transpOrder := void;; y4 O' @) T( f' a- h8 o- G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 J& k% \3 a3 Y* K% S& p7 ?% N* F* t2 C @,root.eventcontroller.simTime);; J0 e" I. n1 h/ h5 p0 l3 s
@.HasOrder := false;" p' v/ W/ b9 l& a: H- E3 Z) I( }
@.DrivingHome := true;8 Y8 v' ~* ^, M, D* b9 s# t' o) O
rgManager.tryToStartTransOrder;
D q8 r, a. F' A& p if @.Destination = void6 U# [' L. h" K: ~6 X& K
then -- no transport order for vehicle @$ Z% e/ W5 Y5 \ l$ Z) Y- ^
@.Destination :=& F* E0 e5 Y4 G* s& k" ~6 C
rgManager.nearestFreeStation(@,track.~);# y8 x: i' |, E
newDirection(@);
2 E2 ~" W$ u6 R if @.Destination /= void then" Z0 z6 J9 Y) s9 P2 ]0 Y4 ?5 k
@.Destination.NumReservation :=
1 j: v: o) u# ^* L+ f5 C @.Destination.NumReservation + 1;
* S- x- [, }) `. p$ `, S end;
B. U5 u T- ]! a @.CurrIcon := "drivingHome";$ F; s U: s8 K. C. [0 Q0 O* e
@.DrivingHome := true;
- Z/ ?+ U0 l$ B( [ end;: [, o! ]+ Y3 J5 e" r0 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 |. P9 X+ C7 y& Z' z y( ? part := @.transpOrder;
3 ^. F6 J0 M* k7 Z$ ~6 | part.move(@);-- load part( |9 y0 H& E3 K. j- a2 J
@.CurrIcon := "load";* j: B$ G: f" a* b) r: d
GlobalDistObj := part.globDestination;8 }; g, s1 Y' K) a, D- A+ |
assignLObj := rgmanager.rgAssignL;
4 h- _9 ^& f2 V, Y2 }5 @9 u9 ^% k row := assignLObj.getRowNo(GlobalDistObj);' K) |3 G9 ?- `5 n; r
if Row = -1 then -- since 70
, G5 Z9 ~+ y% ?' t. G9 C$ _ if lan=1 then
" X# U s6 t8 b* R0 i. Y1 U/ L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ [5 l) ?# O3 q
to_str("in der Andockstation: \"",?.~.name,"\""));) `( L7 }5 B! z% P
else" u H9 [4 A8 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ ]) p: ~5 Z/ t. |, H+ l to_str("in docking station: \"",?.~.name,"\"")); V- ]1 u* X% _4 L
end;
) p/ O. d* }& K- n4 [ else
6 u5 G, ?/ o, H- b @.Destination := assignLObj[1,row];
. m* \; H2 j4 D a' A6 |& l* E" G end;
# Y3 ~. F6 K* Q7 m0 E1 M3 J: W9 @% ~ newDirection(@);& L P' [/ ]8 n+ \
@.HasOrder := true;
0 P6 M% U8 ]- Y; e7 P9 v" X8 S end;- p3 y9 i2 P0 b1 Y
end;
4 J+ }) i5 f2 a3 ~end; -- of the method
7 z- s# B( i4 G, b7 L1 ^* J1 N |