/* called by: entrance ctrl of the object 'track'
* N9 ]/ u8 o3 k% {# ~*// C* L* e; M3 a! A% }
is
. }& O+ X* t+ \, _& W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 G* @2 J+ w( o9 h, Z pdo+ `& ^7 E: c" G( D
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 \* T% K+ ?: r- s; { R" l if current = @.Destination -- else return5 I" M( Y- r+ [6 W- B9 v0 Q
then' o3 [ T. V7 }( B! K9 e/ p
@.Destination := void;
- H$ E8 `% e' O9 h( e9 y if @.occupied then! c2 d$ S% s l J5 P$ j0 {0 ]
part := @.cont;3 D- `: S* y/ b
@.transpOrder := void;" w( Y" X2 t) E ^) u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 Y) F* i2 D. X# }4 q7 K& q @,root.eventcontroller.simTime);6 |: L6 o+ m6 F5 X2 N, W' k4 o
@.HasOrder := false;
; }# Q6 I, p7 d3 W+ p/ b# t, n @.DrivingHome := true;" V# V3 ^' U& i) S
rgManager.tryToStartTransOrder;
' k. a* Z6 B: G if @.Destination = void( X" Z1 y# U4 L! |1 V
then -- no transport order for vehicle @
, L: @/ Q9 Q' k' G @.Destination :=9 a: i- a7 y( ?3 x2 L# y/ d2 w& @
rgManager.nearestFreeStation(@,track.~);4 `, M+ i$ l. U. ^( R4 M
newDirection(@);
' A4 B/ n f' ` if @.Destination /= void then
% r9 d, a9 Y) I) l; l o c3 O( V @.Destination.NumReservation :=! n2 n1 Y7 N, o8 D
@.Destination.NumReservation + 1;' i# Q8 Q; z* v8 a+ x. p
end;
$ X4 @6 ]0 }$ z0 O3 L# u5 w& l @.CurrIcon := "drivingHome";
& N2 M5 l8 u! l8 j# l6 ` @.DrivingHome := true;
& {4 w$ G" [( A) t end;, u# z' H; {" ?; \( @, y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* G2 W2 \' N; S% ~1 L
part := @.transpOrder;
8 @$ F5 L# _" G) e part.move(@);-- load part5 P6 v3 j1 @6 {, e2 c5 Q
@.CurrIcon := "load";
) o8 x- ^% I4 Z& i GlobalDistObj := part.globDestination;% F# \% ~! c6 O! y" F
assignLObj := rgmanager.rgAssignL;
( ~7 x3 U, I" T4 Y row := assignLObj.getRowNo(GlobalDistObj);
- I8 e. c6 ^5 [, K3 z" Y( B5 m if Row = -1 then -- since 70
3 ~5 H: ^; h, ^) `) R if lan=1 then' U& T, D' l7 y- u/ q) Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& A4 `) e6 i( k: }1 _" T
to_str("in der Andockstation: \"",?.~.name,"\""));1 Q e; M1 j* `
else
$ ~0 _6 L9 Z3 c, x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# P1 C4 a6 y9 T, s7 S5 I to_str("in docking station: \"",?.~.name,"\""));
% R! N; E- W9 A$ J end;9 ^4 t2 O) p1 ~( P
else3 K$ F6 B8 O& B# S7 |8 ^
@.Destination := assignLObj[1,row];; `8 b) N2 o, Z
end; / T2 T7 O+ z: W
newDirection(@);7 `6 f% p, f0 F' k
@.HasOrder := true;
0 \6 D8 g* Y5 E, Z5 U end;; ^7 K4 g2 L, R& q! Q2 S2 R
end;
2 [5 Z2 Y, Y# c+ A5 b! S7 }end; -- of the method
9 g8 n/ ?$ R+ h |