/* called by: entrance ctrl of the object 'track'5 d6 b2 Q# n/ G4 S2 I+ j+ r
*/8 Z% @% I; ^- W6 L. ~. B/ v
is" a3 n- s+ T+ L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 `/ |7 z4 h" n: T% C- Y
do
. O9 F3 }, C; h! u& v Z Lan := rootfolder.Internal.Tools.AOLlanguage;2 w4 P) I' Z' G1 h
if current = @.Destination -- else return$ M- b* a1 E% t1 T: K- E
then
* E( w" C' D$ d9 ^ @.Destination := void;
" L d2 p6 ], }# F* ^& N* X: ~6 ` if @.occupied then( m: K1 g7 Q( {4 }. H! h9 f
part := @.cont;
9 a* M6 w& S0 H; z) H1 B" ?: `- m @.transpOrder := void;+ @& c; E1 G/ c8 ?, o+ g; U4 ^( L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' f% V8 y: i% ^
@,root.eventcontroller.simTime);) C+ E' Z& b7 _3 `3 j# F
@.HasOrder := false;
* ~' i( U, }0 _; x8 @5 e @.DrivingHome := true;+ i# u- Q6 ^/ s! R
rgManager.tryToStartTransOrder;" Q$ E+ w: c. C; @& X. U' ], D S
if @.Destination = void! k) L, s. W) t6 }2 I4 ?& s2 o
then -- no transport order for vehicle @* j% U! d% u! v. ~& c
@.Destination :=- o; f3 Q1 c3 _$ ]
rgManager.nearestFreeStation(@,track.~);
. W% k8 W' o9 R& B% s' F( X6 Z newDirection(@);
7 i9 g# w3 f1 T' o3 E if @.Destination /= void then0 a( D2 a( B2 t' o* ]
@.Destination.NumReservation :=
6 B+ W/ N7 W; x @.Destination.NumReservation + 1;# A$ b% g0 p E% C
end;
( S- u4 a1 b6 {! {- P; B( G @.CurrIcon := "drivingHome";2 E: j5 X: O% H% u7 x- O
@.DrivingHome := true;
6 B5 e, l1 Q3 `* l, K7 Y end;
# C3 @/ n8 @5 P+ T$ J0 S else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 Z3 G! X$ J8 V3 Z1 b
part := @.transpOrder;3 g: r Z( u. ]9 v& K+ N% Y9 p
part.move(@);-- load part
5 v; ]0 b/ i/ Z0 } @.CurrIcon := "load";
6 h9 c8 i# D# I/ ?) k GlobalDistObj := part.globDestination;
( D+ n3 i. y a assignLObj := rgmanager.rgAssignL;4 ]2 \& l" u1 Z! I) q
row := assignLObj.getRowNo(GlobalDistObj);7 B T- Y" b1 c3 g& I* k
if Row = -1 then -- since 70
' ]. ~; M- g' C, h+ e" {: c& ~7 k if lan=1 then
; f/ g) }4 P" E* d7 N6 {5 a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& X `- m/ o5 K
to_str("in der Andockstation: \"",?.~.name,"\""));
# f( `( V" y3 M: ] else+ M6 Z( Z! M; E8 p/ ]& p9 K& A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ a! Z- S y9 \ ?& |/ U to_str("in docking station: \"",?.~.name,"\"")); 3 U( C* h7 f& U7 {; w G$ X% r9 B
end;
J& s P8 l( @# @7 D2 \1 g else
& d& } K/ s" s9 x; [; N @.Destination := assignLObj[1,row];
1 M' Z! p3 Z4 @! I end;
6 K8 j+ d3 v1 Y newDirection(@);
4 ~3 p2 a- n* Q7 X. d @.HasOrder := true;6 w* A3 W- f" \- o. Z9 T
end;
5 U/ @% B2 ]1 _( | end;& X0 {+ r g8 g0 n0 G' v0 Y1 E
end; -- of the method
4 ]5 W& a/ z. e2 o% p- h |