/* called by: entrance ctrl of the object 'track'/ E* H) R7 d) K+ Y2 j" ~: O! G
*/+ r# f8 E( R! g l3 ?7 x
is
' b6 X C: v* ?7 n5 v7 [$ L9 |8 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' o- m, Z( u$ `1 }do. y8 N2 \2 \7 J+ E1 J! b
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 }+ N; M4 v+ w& m, G if current = @.Destination -- else return. z$ |5 K6 S1 l6 O3 g% t4 L
then
1 a6 t6 {6 Q* H! F: N! p @.Destination := void;9 I2 {* ]3 U' E
if @.occupied then W! N; W. ?( W. z, o8 c6 Y
part := @.cont;
+ l3 I8 l. e$ X, a) T" b' K @.transpOrder := void;: w% k8 Z( `- H9 E7 _ i- B% @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! h. W; R9 C# t6 h1 X) p" ~
@,root.eventcontroller.simTime);( z( O. x& q. |2 u
@.HasOrder := false;
Y) W% ^; E+ l0 c# g @.DrivingHome := true;7 p+ J4 v: U* U( ?
rgManager.tryToStartTransOrder;( r! T' J8 j- l7 ^. z+ z7 H
if @.Destination = void
/ u. K3 o1 ^5 j5 `' F, G then -- no transport order for vehicle @
9 n7 Z9 E' m" f/ h m9 E' N @.Destination :=" |% C3 q) }8 t P5 k0 R# I
rgManager.nearestFreeStation(@,track.~); X; q1 E, }) t; y# Q r# k
newDirection(@);
( X2 X8 F" |+ P+ z8 h; q. H if @.Destination /= void then0 M8 e. I' T3 _* _/ [% I4 u, D, i
@.Destination.NumReservation :=; }+ o' T( J4 u, z' z* J
@.Destination.NumReservation + 1;
" E2 p3 W6 b x4 g U end;
. S, M ^% W% Z/ k) b0 r7 J @.CurrIcon := "drivingHome";$ Y L1 l9 _8 l5 _+ k
@.DrivingHome := true;
: I! A! ?) n9 }5 I! \8 h/ m end;! ^, i5 F' r, o; e6 o1 x6 F- q6 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! [8 v: I% y2 [ part := @.transpOrder;
. j. ^; q& ~% P/ e3 }6 H part.move(@);-- load part
- ?: K8 `4 P7 y5 c l! F2 ` @.CurrIcon := "load";
. m; u0 E, @$ I8 _# F GlobalDistObj := part.globDestination;" Q0 m0 Z, l$ Q3 G- s
assignLObj := rgmanager.rgAssignL;
' \% T/ v" x) `/ N! { row := assignLObj.getRowNo(GlobalDistObj);3 m) g: u. \& f$ I7 W, e Q5 F
if Row = -1 then -- since 70
2 p! Q$ N' t) ^, Z! [ if lan=1 then( T5 }! z8 e( T5 g9 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 o5 o. ?; J3 ?
to_str("in der Andockstation: \"",?.~.name,"\""));
# m+ k' g9 O( I/ x! n; m! f else
0 o+ L( }$ m8 K- v: n- `& ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 J/ T$ O8 ?9 F+ |
to_str("in docking station: \"",?.~.name,"\""));
; W' D& v$ X; X \! p end;0 @: M4 _& B; P$ J/ I0 Y
else; E" w+ U/ m/ j/ \
@.Destination := assignLObj[1,row];- q) h/ q7 @8 m& Z y
end; $ V) ^2 o. ^7 g4 b3 b) [
newDirection(@);& K6 c+ K+ |, L' B$ |
@.HasOrder := true; g4 P: t! ~3 e1 v. z1 N, T# `* i
end;
2 P8 p% P5 H1 a5 B8 ^" {: Y end;5 d- Q3 Q1 R* l9 U1 B
end; -- of the method
/ W% w, H; q4 N1 }3 f# @ |