/* called by: entrance ctrl of the object 'track'
" e1 Z. l9 L# t*/
; z9 a4 s- O# R& f6 tis
5 E, h7 M1 R | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 W' I3 X. g9 Fdo) v% q! \' s- U, i2 X, R2 {
Lan := rootfolder.Internal.Tools.AOLlanguage;. C& | p. _( z
if current = @.Destination -- else return5 n/ T4 b8 w+ }$ |
then+ T6 n( ?/ E+ ?
@.Destination := void;
# [3 P4 J$ N ^( h, \ if @.occupied then
. g) g% {# P% P) U! _4 z part := @.cont;
: L/ I5 x8 L- H @.transpOrder := void;
5 w5 D2 Z- e2 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' j1 o7 Z, Y4 X! `. g7 n f @,root.eventcontroller.simTime); t0 m: b, F8 L) p+ G2 K+ {0 f
@.HasOrder := false;
% M, Z9 v0 B; D4 H) [ @.DrivingHome := true;) d/ z2 h) N+ w! J4 X5 B
rgManager.tryToStartTransOrder;
* z' t# | c& s3 l& K+ {; ?" G if @.Destination = void
; B/ e, R }" g then -- no transport order for vehicle @
+ V1 N" f% u) u4 D A @.Destination :=
( p: G" y& F: Z( }7 X$ ~6 i rgManager.nearestFreeStation(@,track.~);5 ?$ O6 }. n, w }
newDirection(@); 5 R H, L1 N E3 E
if @.Destination /= void then6 N( `# t1 ~: Z" u
@.Destination.NumReservation :=9 O3 K* ^. w. k: {
@.Destination.NumReservation + 1;
2 Y8 s5 q: k- x0 ^ end;
; g% Q" n: J. t W @.CurrIcon := "drivingHome";" J5 C" Y, I ^7 b8 L4 ]0 e8 `/ c
@.DrivingHome := true;0 y. r, S" M5 B; w+ U6 _# g
end;- Y0 k5 d1 q0 q( ~7 a; I; e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 I, ~; C9 y2 \4 _- z& x part := @.transpOrder;
3 ?- ^$ w$ @% a2 L8 N3 O2 u part.move(@);-- load part0 B) ~3 H+ v4 d' g2 ]
@.CurrIcon := "load";, F3 R* h& w: c% i- w+ r
GlobalDistObj := part.globDestination;: {4 `/ p# V! R7 {7 ]! |9 ~+ A
assignLObj := rgmanager.rgAssignL;: q# C# G" h' c% j# _, F* m
row := assignLObj.getRowNo(GlobalDistObj);" l0 `/ e+ G! l3 j* C6 C8 W5 A
if Row = -1 then -- since 702 S l/ J. K+ A% w
if lan=1 then
: V1 o6 G# n& `2 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ c1 M5 ~& W& _$ Q( n' d3 D: p9 R to_str("in der Andockstation: \"",?.~.name,"\""));
& ^+ l0 J* ~# q, o. _# v else7 U/ V, D" z* I/ X: s; N3 t# n$ z1 Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* u" n2 U# r5 R0 t4 |7 _
to_str("in docking station: \"",?.~.name,"\"")); / [! ?$ E; Y# p8 j0 e
end;
, g/ Q) k, A- c, B- h3 v else
( ~/ Q, ^- g0 R @.Destination := assignLObj[1,row];& Y5 @8 p& |5 p, e
end; 2 C8 K6 x& e& E) l6 ?' }0 D
newDirection(@);
6 `* S/ V' S: y8 C* H1 { @.HasOrder := true;+ |% r& C# T2 D: C3 U) i
end;
9 U E" Z, e/ E! B end;. J+ }" A% B0 l. ]( M! [
end; -- of the method
E& h+ P5 n/ P# r2 v0 F+ n5 F: i* x |