/* called by: entrance ctrl of the object 'track'
7 L" ?$ u5 l( D# ? p7 j*/- N# B, C# I/ I1 |, [; {" M, P
is
6 p, h. p# |; T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 J+ M$ ^7 _+ wdo
$ X/ k# W z$ a- \3 k Lan := rootfolder.Internal.Tools.AOLlanguage;; C5 J, Z/ B. W2 ]8 E8 {, K, Y
if current = @.Destination -- else return- x: p5 }& A( U) \5 \8 [
then
3 \+ u5 W. ^( [5 t3 u9 m @.Destination := void;$ f$ d2 q! E' E- s! O* Q9 ?
if @.occupied then2 J9 U; t, a/ ]& K
part := @.cont;
5 M6 H% f# G3 t8 p @.transpOrder := void;+ r$ h- ?( e+ c: ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 X* u9 c* t0 U' T/ z- B. ]2 S: ?2 E
@,root.eventcontroller.simTime);
% a' g$ h1 v. K O @.HasOrder := false;- D v# n) O7 c
@.DrivingHome := true;+ P8 j; t# i1 k+ [7 k) D8 k+ Z
rgManager.tryToStartTransOrder;6 d, t( _4 z' j! R ~4 e' e7 `
if @.Destination = void! d' \+ b4 F: E+ p+ j' ?
then -- no transport order for vehicle @ f& A. q4 C7 X; B6 a5 S2 }- t Q; Y
@.Destination :=
* `4 ^5 N( S, J7 \& e rgManager.nearestFreeStation(@,track.~);
; C) C+ S8 F8 Z& P3 P+ E newDirection(@); . Y. b3 o# m. g+ t
if @.Destination /= void then
( `: P9 D# ]$ b/ L: U0 O @.Destination.NumReservation :=
2 O5 P' {, }$ z) p0 Y* m: a8 { @.Destination.NumReservation + 1;
' q6 W7 M* o/ y* ^$ U2 Z, S0 ?/ V( \! R end;- W# K! M+ ~/ l4 u, ^/ v2 J
@.CurrIcon := "drivingHome";
4 Z- R- x. C# w* D @.DrivingHome := true;
% q) P" q8 K5 c F; N: p end;
: `; Z& q* L# N8 Q( n8 q" O, {" ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station! J1 v( q& b' v' X9 N& K( v1 f1 I
part := @.transpOrder;- x& C2 i9 Y2 c' V, \. Z" S, z* O
part.move(@);-- load part7 H* d" A0 f8 p! W& p( y- T
@.CurrIcon := "load";
2 x$ ?1 |/ j2 {) V# h GlobalDistObj := part.globDestination;" X) u. i" G# X: l
assignLObj := rgmanager.rgAssignL;
6 M8 @8 r+ \( L. G7 G( j row := assignLObj.getRowNo(GlobalDistObj);: e1 W' {& Z" J+ {' ~
if Row = -1 then -- since 70
4 y1 h8 v$ X, k' [+ N# n1 p if lan=1 then( @; m; L1 q- j4 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* ~! P4 E/ L b- f) h
to_str("in der Andockstation: \"",?.~.name,"\""));
/ p" Z/ C, `# y8 E else
' s3 l8 `7 i: _: r# B9 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( |6 h( A6 c* F
to_str("in docking station: \"",?.~.name,"\"")); * J" J' E6 s/ I, o3 q0 u1 F: u. `# y# \
end;' I# l7 {3 J. x: f9 s
else2 c; R5 y0 ]+ b+ x- P
@.Destination := assignLObj[1,row];8 m2 a1 b6 Z# n* F% J: [8 u! T. C) X
end;
: x1 k2 u. C/ `. Q8 G& k0 ]" i newDirection(@);7 L% ?$ G0 i! p n, L6 M: t- _- v
@.HasOrder := true;4 J: A# d. V0 t! x8 |7 @
end;
. z. H7 H" J1 F% h" I+ u end;) I- c: v+ E& G3 f% H/ e
end; -- of the method
" L! C N' H' f. j) ~ |