/* called by: entrance ctrl of the object 'track'( r. k0 O' x$ Z3 [
*/- z% G6 R/ d& [ b v+ {
is
# k6 Y8 \/ E. J5 p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 C) y# P1 C7 n5 J8 {; cdo2 R. D0 `$ n1 p9 I" {
Lan := rootfolder.Internal.Tools.AOLlanguage;& ^& M- g% |5 t" i
if current = @.Destination -- else return
# G# u6 c2 _. t+ ^6 C8 { h! g then
7 L2 g% N, o' {( }+ O5 X @.Destination := void;
3 d4 L5 [& e F8 R. X if @.occupied then" R' T8 U, i0 S* Y2 I
part := @.cont;
2 [3 Z, h* ^4 \: {* R( _9 p @.transpOrder := void;
0 ]8 F, Y8 b8 [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: b1 c, H7 [% i: b
@,root.eventcontroller.simTime);
3 o- D3 Y. B/ G; y" E @.HasOrder := false;
- Q5 G$ X* d/ C& j/ y" v; }4 E+ u @.DrivingHome := true;
+ L C" \+ F$ }/ P5 q) T' y7 A% O rgManager.tryToStartTransOrder;7 d& [4 i* A! m @" [* n$ u
if @.Destination = void
/ d( N5 S' Z6 @ h$ r then -- no transport order for vehicle @
7 t* y% V# v) d: Q# b5 v! v @.Destination :=
; T1 a8 ]! U: ]4 \8 E" I/ w$ g rgManager.nearestFreeStation(@,track.~);6 A9 e' ?& K5 Z6 ?* A0 S
newDirection(@);
# F5 K5 W& \4 J/ Q2 |( c if @.Destination /= void then
3 S7 ?- T/ ?. A& L5 s1 F1 G @.Destination.NumReservation :=
+ }; w/ l0 q7 q# C$ S8 P @.Destination.NumReservation + 1;' F. E+ _5 k; l4 m( s1 G
end;, r) e( _0 T0 d7 A1 E- y; q
@.CurrIcon := "drivingHome";
% E7 O1 ^% ? H; y$ T3 s3 T @.DrivingHome := true;3 B; F8 ]% D4 D4 W
end;% [) n1 a9 B8 o* Y$ x8 W* U5 I: `$ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 h4 _3 u1 { ]* ^4 Q* W$ `: @ R
part := @.transpOrder;
- z; |: n) h! f& E; I& r' E( P8 ^) L3 z part.move(@);-- load part+ g5 o q% {& o, M1 J2 q$ m, s
@.CurrIcon := "load";) h! b0 D- U5 l
GlobalDistObj := part.globDestination;0 ^* t% h7 r5 Q+ r
assignLObj := rgmanager.rgAssignL;
8 C0 H r% D- Q b row := assignLObj.getRowNo(GlobalDistObj);0 ?' a2 \ d8 r
if Row = -1 then -- since 70. b+ O# L) N! u. v9 T$ R
if lan=1 then8 s! g4 z4 v! U O+ D: @4 s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ Y, s& u; Q# h" p! z& y to_str("in der Andockstation: \"",?.~.name,"\""));
# K2 ?) j, A D6 @( P. r else
' f1 c) k5 J; M" l* v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! U; u+ ?- J# U3 z to_str("in docking station: \"",?.~.name,"\""));
, S1 E! z( N7 o. S7 I8 q end;
0 H5 ]& l8 ^8 ? m else- V) O- }$ {; b* Z* V& |0 `$ ]* }
@.Destination := assignLObj[1,row];% D% w( u% L5 r r a. o! s* k v
end;
/ p; `" x9 q" w newDirection(@);, U$ J D9 D) |; J3 ?1 z
@.HasOrder := true;
- A8 W) q y0 o# V end;
7 r/ a( H/ a/ t( B end;
/ Q0 W& Y) ~& Tend; -- of the method
! v8 [# \9 j% K1 ?5 w |