/* called by: entrance ctrl of the object 'track', @8 W9 @3 L6 s( h) n- [6 Y+ v
*/3 ^6 `) |) E/ a1 t* A* S, ^
is: B3 |/ m3 k5 A- y& i* [( {$ e9 P5 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 Q8 x$ O& D! O/ A' G
do* @( _& E$ q1 V; e' x. S
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 A% T; m+ h& n5 ]2 T" S if current = @.Destination -- else return: e, M5 v. p8 G6 B
then
) ]" V: J/ n# P- o# i; ` @.Destination := void;
9 X$ K" ]" ^% q; g1 h ? if @.occupied then
: l8 x4 P' }# _; l part := @.cont;3 u2 P7 H R0 ?7 N- x% O
@.transpOrder := void;
; S. S! N( I; j3 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ~" b) \( z* W3 Y" o0 \- o
@,root.eventcontroller.simTime);; r; R& g& M- J. {, @
@.HasOrder := false;
& ?* R% |) a W0 l @.DrivingHome := true;
' Y) K8 J# f9 w" Z2 H) s/ w/ { rgManager.tryToStartTransOrder;" R4 K. m7 i9 m0 l1 R/ D3 |) o
if @.Destination = void5 X; `) K' ?# R1 z8 {
then -- no transport order for vehicle @6 B! Q0 v8 `2 l' B, b. ?
@.Destination :=0 b& M* v2 v9 y3 [
rgManager.nearestFreeStation(@,track.~);
7 K; N5 a/ |& @" \" ]# \ newDirection(@); * V# I+ W; f% ~1 i7 O1 I
if @.Destination /= void then
. M; y7 B/ E$ V2 Q' v @.Destination.NumReservation :=8 H( Z& D) _/ ~2 [7 `3 J: c4 r# \
@.Destination.NumReservation + 1;
- |8 a" i0 ]1 ?5 a. \' C% U end;6 ?, o# B7 u- m: V
@.CurrIcon := "drivingHome";2 d6 h- L( k* I+ k6 k. q4 H3 e
@.DrivingHome := true;6 U3 M2 t, \! u' A0 [- c
end;
. A. D+ @. [# Q! y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
G Q, R& @' F0 U8 J part := @.transpOrder;4 g7 B$ l$ d* ~ D) v9 }3 m4 J
part.move(@);-- load part
% G7 i( G6 W+ |+ ] @.CurrIcon := "load";
+ Z" ?5 x* I/ T) ~# A0 \ GlobalDistObj := part.globDestination;
D* U, ?4 H' F) |* L assignLObj := rgmanager.rgAssignL;
; y1 v5 e: b. B9 e0 p! R! ] row := assignLObj.getRowNo(GlobalDistObj);
5 @: a2 z* t: ]: E6 u! {7 U7 R! x if Row = -1 then -- since 70
$ c7 y0 @8 e/ W3 v) l if lan=1 then
1 v2 Z" t, b8 g4 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( K) f2 d# U5 r) V. v, \ v
to_str("in der Andockstation: \"",?.~.name,"\""));( K, P( |, b( M$ D O# O1 ]3 {
else" b5 K) V# z' A" M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ X6 T6 s6 F" _+ k; B4 \+ @
to_str("in docking station: \"",?.~.name,"\"")); 6 i+ E* H, e) `7 N) D
end;# ^+ r6 |- l9 t) u
else
7 N5 t) q! f; `: K; m s! s9 V @.Destination := assignLObj[1,row];+ x2 F1 o4 U6 t! H
end;
+ t% M; g7 d5 [% ^! G, t7 w. G5 H newDirection(@);+ l# t2 B1 l* t
@.HasOrder := true;9 U4 _0 q' H! M8 b; b, a1 V
end; f1 {- y7 S% t& [2 F' l" N9 E( o
end;4 O* S7 s8 C4 d( p9 t; M+ K7 Y8 R
end; -- of the method) O& b$ f) u4 Y
|