/* called by: entrance ctrl of the object 'track' ]0 T+ t( C7 {( w. X& S, H' t
*/
! @0 n' ~. {: m5 C/ tis
4 ^. E0 r: N5 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;& ^4 ^# `) u% E* K2 z7 [
do5 G6 \7 X4 n4 d @4 ~. N0 l, u" I* v+ F
Lan := rootfolder.Internal.Tools.AOLlanguage;) \" a: V" O' Z& s, M
if current = @.Destination -- else return `2 ~! e! y3 E9 \
then# X" S: B5 e+ R j
@.Destination := void;
6 G1 E5 H2 m9 _7 ]9 P" e if @.occupied then
! E& f, f8 x% Z( H; w& \' i& b4 w part := @.cont;
9 p0 V" o: B1 S1 r) m5 y @.transpOrder := void;1 y' f# |# O0 M8 l1 j) V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, s: l7 ]) ~3 j
@,root.eventcontroller.simTime);
; r$ l. T' i4 p+ M7 F7 y- |* j @.HasOrder := false;
e i) t( J) f" U# U# e; s5 D @.DrivingHome := true;) }' O# j6 w/ {0 F: P4 I6 ]7 Y/ Y* A
rgManager.tryToStartTransOrder;1 d0 [& g/ N9 e8 {2 n1 y( {* Q* H" k
if @.Destination = void
* G) f V' ]5 u! P% }4 Y L$ L then -- no transport order for vehicle @" i6 S, Y9 P6 I8 B9 O/ h. `! a, m
@.Destination :=7 |6 r) |- E$ |0 Y2 V; _* I
rgManager.nearestFreeStation(@,track.~);8 Y7 E6 a- Q4 q, Q6 }* P3 P
newDirection(@);
& }5 G E+ K! h% f' `; D1 Q if @.Destination /= void then
/ S z6 f4 R" E* X @.Destination.NumReservation :=
' u- ?+ c: o) m @.Destination.NumReservation + 1;- j7 j% a0 n5 S* k$ m7 Q2 a
end;
1 ?. q% D# v" N7 H6 x, D/ p: T @.CurrIcon := "drivingHome"; g* j. ?: h9 h" j# g
@.DrivingHome := true;
% E3 O- X" L% Q! O6 D9 A end;
; L& c) {$ f* H4 m! u* L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 ?: R6 Y0 | |4 i' @5 q5 v) d3 x2 [ part := @.transpOrder;, p: z* R/ i$ X8 N: [5 d" Y- z
part.move(@);-- load part% M, e+ k" D5 g' y) ^% s( h; l
@.CurrIcon := "load";$ u6 g0 v/ F8 N6 o
GlobalDistObj := part.globDestination;7 n, p; V( U- {/ ?
assignLObj := rgmanager.rgAssignL;
/ x1 m. T0 A6 c row := assignLObj.getRowNo(GlobalDistObj);6 a# g7 J9 j1 D5 Z
if Row = -1 then -- since 70& O9 D1 R6 S6 Y, d
if lan=1 then7 |* L; J) w" t2 S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ w( ^# w( [1 J7 ]. [& L
to_str("in der Andockstation: \"",?.~.name,"\""));
i e( n% M1 N' ~* A: T else( V+ X8 T4 V+ C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 \4 Q/ _# Q# n6 ~! E7 Z to_str("in docking station: \"",?.~.name,"\"")); # ^* B* X/ m( K+ } L+ ?
end;6 T7 b" [' Z* @- N: k. n' t0 w
else" t# I4 Z. z( p% y% F+ Z0 d7 |
@.Destination := assignLObj[1,row];5 b. M9 A( y, U
end;
3 s0 j+ _# q% A& g; X% [) U newDirection(@);
_, K- X" r& o7 _' n% m @.HasOrder := true;
1 N" \) n# B/ b3 Z end;' F- d1 G% z+ ~, r7 x- ~% i$ T1 I
end;% I* b. o. I6 B
end; -- of the method& c' j- m, n( ]2 K7 x. z. X1 j
|