/* called by: entrance ctrl of the object 'track'
0 Z. P1 @$ v9 q' Q*/
7 U' e$ m# w X& ~. B6 R; Bis( A6 p; V) P% T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 w. r+ u" d( b: A4 Bdo
+ s3 q% I! W: X! P7 `) m Lan := rootfolder.Internal.Tools.AOLlanguage;7 Z1 o: [, D$ O( a
if current = @.Destination -- else return
1 d. y4 r$ k- C then) O A( F0 Q' c; K
@.Destination := void;
- Q0 C. }( q; E& `! n6 U0 l0 z if @.occupied then
% h& z0 |. }' A L# z6 Y part := @.cont;( A& T1 b# K8 ]1 r B6 Y
@.transpOrder := void;4 C1 ~) Z* y: z v+ g! z" j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 }! |! t- Q) `' `& d* ? @,root.eventcontroller.simTime);
' P. ]/ Y# ?; j& O7 L# H @.HasOrder := false;
8 U2 k! |7 ?: n/ z8 y @.DrivingHome := true;
! _3 l# k. H$ N% D% L( q rgManager.tryToStartTransOrder;
9 @ b! i) k3 \; f9 Z6 G if @.Destination = void
" G8 J+ R) b3 A! Y then -- no transport order for vehicle @
^6 U: d e$ ^3 Z @.Destination :=# e8 v4 ^) ^4 ^3 n# T
rgManager.nearestFreeStation(@,track.~);
4 T9 J! G- q$ d' M newDirection(@); $ C S/ \ M4 J
if @.Destination /= void then/ T4 ]5 n8 h9 \, g8 S, D
@.Destination.NumReservation :=
3 K. H4 z- [; N8 i: ^ @.Destination.NumReservation + 1;8 d! }1 ~" ^4 ~8 c
end;
- d6 ]. x( i" g1 t3 \: w8 Q0 h @.CurrIcon := "drivingHome";
% N# E! `# Y" v6 N4 l$ u @.DrivingHome := true;
: X5 }$ G7 x( Q0 H9 g g% ?8 P end;
8 w9 v9 z9 T5 a7 c; I9 B else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 O7 U) G8 \6 k% y n
part := @.transpOrder;
$ h4 \& k3 h; W part.move(@);-- load part- o" }& T" G- |* o5 W x* D2 d
@.CurrIcon := "load";/ [' X( K& @+ u, ~
GlobalDistObj := part.globDestination;
3 N( M( a w3 m S* E4 y& X3 Z4 g3 i+ G assignLObj := rgmanager.rgAssignL;
b5 `8 c# D5 d/ [4 O" d row := assignLObj.getRowNo(GlobalDistObj);
5 W& j' g& ^/ ]6 { if Row = -1 then -- since 70" A4 z# N- ~6 F" { @# [: ~" N5 P
if lan=1 then" ~$ z' G- X& I# i l6 M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' `+ W' h* ?5 |9 S5 J3 H$ W to_str("in der Andockstation: \"",?.~.name,"\""));- _% h0 V- s6 W2 a3 z
else
) n& A$ I3 }$ d2 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ?! n5 B' L4 S1 ?* A+ ^7 b to_str("in docking station: \"",?.~.name,"\""));
+ i, y% f2 B, q end;. \9 n3 P* S n
else) P. U9 E3 I$ l, i
@.Destination := assignLObj[1,row];
& f. Z+ h0 R, {' F( A: I& P end;
* z3 O1 H, n: ~ newDirection(@);" I# g# w3 B6 T1 ?7 f; G5 a7 D- y
@.HasOrder := true;
; P: G O+ W. d4 A/ G/ o) U end;
( R) F+ r7 R' S* U end;9 O( J. k8 d! Q) S" O9 ]+ R' \
end; -- of the method
4 b& f6 |! O* r3 n9 T |