/* called by: entrance ctrl of the object 'track'
' K ^$ s( ]& o; v: I*/
* B- }& K. l+ s. P" }; cis- ?, a8 F0 o3 z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
s( F \. I9 L edo& W" G. q/ u( P2 r
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 P0 g- W! x- \" q+ W3 Z! [ if current = @.Destination -- else return- X' L6 D. |( n, @
then
8 a/ F2 q+ c; d* {5 P @.Destination := void;
8 z$ q9 H* A, x' U7 e if @.occupied then: x$ t* L$ b* \* e8 g) g3 d
part := @.cont;
) T5 U- P8 J0 s9 Z2 s" N e @.transpOrder := void;
, U' Z* J( E* F; N+ u' v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# Y4 |9 e X9 `8 }* z& n# { @,root.eventcontroller.simTime);6 n( v) A' t% p) u9 W" q
@.HasOrder := false;
% }; E" o' I* {9 E @.DrivingHome := true;
/ m6 x4 Z4 L2 Z% w$ R rgManager.tryToStartTransOrder;
m+ ], a: z# T0 H: w1 ?+ _* _ if @.Destination = void
# z* L. B3 b0 i then -- no transport order for vehicle @, a' F ^1 |0 C N/ [) }1 `
@.Destination :=& u0 A- g1 x. C$ X( }/ e
rgManager.nearestFreeStation(@,track.~);9 y( q& d# F5 Y, c9 Y' G
newDirection(@); 1 E5 [3 H! A9 S$ N( T2 g9 U
if @.Destination /= void then* F/ q- Y8 t7 Z5 w+ k
@.Destination.NumReservation :=
( ~ [1 I4 m# Q0 e. }6 `# b( T @.Destination.NumReservation + 1;
: |- H" b2 e0 o1 @3 G end;& E4 W, D$ P9 Q: l3 h( K- L
@.CurrIcon := "drivingHome";! u m! m; ?4 [( K( {
@.DrivingHome := true;
& A" w1 b# j4 d: l. d end;
4 c$ n' }9 y! h" ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 }9 k- C" s2 m( u* @/ B9 D3 e
part := @.transpOrder;. Z" { H& ^1 v8 W6 O
part.move(@);-- load part
1 C& C( o2 N: e c; m* L+ J @.CurrIcon := "load";8 m v! f. ^6 H$ {+ M; l% X
GlobalDistObj := part.globDestination;
- ~: B# G) ^& ^/ o, [0 k+ ~( V assignLObj := rgmanager.rgAssignL;
- m; K' x' \$ \ row := assignLObj.getRowNo(GlobalDistObj);0 w2 a2 w7 A0 w6 q' v
if Row = -1 then -- since 70
/ p4 M6 J2 {. N3 V+ ? if lan=1 then; l; d8 L; ?$ n7 Z1 w; `/ N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 K! E. R5 n# [& j to_str("in der Andockstation: \"",?.~.name,"\""));+ T7 F0 A! y, |. ]. c
else
: G0 }, n' Z& {0 L5 x- z6 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ K" m( N$ n: k+ L- S
to_str("in docking station: \"",?.~.name,"\""));
3 ^) \; i4 X2 M: ~ end;( D/ R$ |% l4 m; @
else
) V; `& T: k E( z @.Destination := assignLObj[1,row];
3 r S. V4 C! y7 |% a, F* P end;
% Y" i( n6 M o+ ]2 M newDirection(@);
1 L+ X( T7 a* F @.HasOrder := true;4 V! }9 E% j! ]3 Y) C$ Y
end;7 w. Z: P% t1 x% I. X! E1 j
end;
+ Q$ d! O2 z& B4 f8 H ~5 wend; -- of the method
1 |3 `8 b! I2 } |