/* called by: entrance ctrl of the object 'track'
. W, y. g. E- S3 e9 N*/
7 L% Y: e( ?7 P; {4 |. H8 Y4 a( G) Cis
; ] `/ o( a: \3 @: W2 T2 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! a2 d/ r( w A& m+ pdo# x6 a4 @( E W: m- z
Lan := rootfolder.Internal.Tools.AOLlanguage;
" |0 l% y! }" |9 ^! ? if current = @.Destination -- else return7 r, E- d: H5 u
then0 B$ V l @, I0 U2 E
@.Destination := void;7 q, O9 x u: P, u- B5 U* j
if @.occupied then" P$ |. X- S# E$ o8 b* _
part := @.cont;
( l/ O+ r c- @0 `. n) Y2 k @.transpOrder := void;
6 O$ I; `7 @1 l6 |& @$ A$ G8 z+ G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ G2 f. i, |1 @: O+ q/ ?; h& W: Y @,root.eventcontroller.simTime);" k4 i1 u, h) E& y% J
@.HasOrder := false;
3 a; ^6 x6 {" }8 A @.DrivingHome := true;
5 `7 j% K' S9 S2 d( @ rgManager.tryToStartTransOrder;0 u5 n, w$ D3 W h6 h! m0 }1 y8 t2 ?8 l
if @.Destination = void
1 p4 ?( X" W2 n. @: A& q. A3 j then -- no transport order for vehicle @) h% |+ Y) X# y5 x
@.Destination :=8 I/ ^9 ^- H) ]+ q4 F, Q7 r4 _
rgManager.nearestFreeStation(@,track.~);2 N6 [' y4 I* n- o+ Z6 ?' q# J' ]% N
newDirection(@); ; v' D" Q4 s! V Y. F% S
if @.Destination /= void then
! v# X; n* i7 w7 z @.Destination.NumReservation :=4 u8 E2 E* G5 Y; g
@.Destination.NumReservation + 1;
5 p7 H. |% h4 s# t6 X. Y* f. T- E end;5 F/ @2 `# c( }0 r
@.CurrIcon := "drivingHome";) L( W- h/ A- t) p$ l8 y- U
@.DrivingHome := true;% v/ {' P+ t ]( [* [" x2 v
end;+ g- b0 I# }0 @% s1 R& F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* @ J+ E1 B! Z part := @.transpOrder;& [ D! E8 x3 }/ T4 A0 ?# a
part.move(@);-- load part0 q; r& m& d3 {1 c4 `0 E, O
@.CurrIcon := "load";
0 P, j: w8 d O) y" _4 L GlobalDistObj := part.globDestination;" c1 _) s( y& e
assignLObj := rgmanager.rgAssignL;, {/ F9 I$ k: Z/ t/ f+ w1 K+ E
row := assignLObj.getRowNo(GlobalDistObj);
3 d" O# d4 B9 R9 L9 r% w if Row = -1 then -- since 70
2 v4 W# t" I! G H% G if lan=1 then
7 E; ~( L( n2 s4 |# K5 B: b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' \6 ^% _' _# c; \7 d
to_str("in der Andockstation: \"",?.~.name,"\""));
5 M# N7 I: D& @ t: \ else
6 k8 T3 ~: ?/ N+ Q7 l* @3 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 _* Y3 \7 m" I to_str("in docking station: \"",?.~.name,"\""));
5 |8 A/ F* [, A" s' D end;
/ d' _) f9 X5 o4 p3 d- Q else' q/ M. n# W+ H
@.Destination := assignLObj[1,row];' W7 R, c+ E. y l" W
end;
6 ]2 p/ u0 a4 R- z2 Q newDirection(@);0 m+ x4 Q8 O9 C; O5 W
@.HasOrder := true;
/ K5 k1 N+ Q' _1 { end;8 V u4 G# H [
end;: V( R9 @6 [- p G' [, f
end; -- of the method
" c0 k3 n2 c1 R8 o" J- B3 O |