/* called by: entrance ctrl of the object 'track': W( p0 o' Y Z+ j
*/
" F( \; X& k+ a5 I7 a# w2 }5 z3 n/ M9 ^is
$ Q" m- S# [9 q& ~6 y1 V$ R* } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" Y8 P8 U q+ Zdo. L, J6 O' }$ N# |
Lan := rootfolder.Internal.Tools.AOLlanguage;; d7 V# z5 A8 e8 b$ T" t7 N0 l5 P, Q6 }
if current = @.Destination -- else return
% x" S- ]3 t) a2 { then
5 ^" G. v6 q( p1 e& Y4 j' F @.Destination := void;
4 d& @! j; d- _# \& `) ^ if @.occupied then# U7 e: Y6 g+ }- I: ?& `
part := @.cont;
0 y! H8 R( a! |" ^$ S- k5 a8 H @.transpOrder := void;0 Z) b2 k% g. X. V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 C9 N( U, v, L! r7 {, e @,root.eventcontroller.simTime);+ A! l5 o2 n0 |$ [
@.HasOrder := false;
3 ?# `2 m4 q- u& m& x3 D @.DrivingHome := true;5 `6 s8 c8 P; S) w, B
rgManager.tryToStartTransOrder;! J: T4 b- z/ u1 e0 }# `- F, ~
if @.Destination = void
+ @6 h" n% E, A then -- no transport order for vehicle @3 U! ~# `) q0 w) [
@.Destination :=& l" c% ?* E1 }8 L
rgManager.nearestFreeStation(@,track.~);
0 }- n+ d; S6 L3 W4 s" k, f newDirection(@);
- E8 a6 V0 I2 y: A* T; T if @.Destination /= void then
Y9 M* K( q. P) g @.Destination.NumReservation :=& A* L; J* z L1 o% k/ S0 {$ j
@.Destination.NumReservation + 1;8 R. b( g2 ^6 x/ n) b9 O: g
end;
. D7 A# W, h5 F: q3 v, { @.CurrIcon := "drivingHome";* x; l* [, C2 _9 J$ l9 R% v) X
@.DrivingHome := true;, n& P% n5 U7 i. F( d
end;6 B, J- A- I5 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
?& r& m, e: d) ^+ K. ` part := @.transpOrder;
y( ^7 W! V, q* V4 o0 i4 ?" Q part.move(@);-- load part
7 F/ O: w; k8 _$ U9 Q @.CurrIcon := "load";" Q9 H% Q4 L! k- B0 Y, ^
GlobalDistObj := part.globDestination;
0 p- H. |/ s+ J$ Y3 d/ ^, R- T6 r assignLObj := rgmanager.rgAssignL;
# V) H: v0 i" ^) r row := assignLObj.getRowNo(GlobalDistObj);
! p S5 I& ?! W/ X7 u, V7 E if Row = -1 then -- since 701 y! t5 ^& y0 P w' Q
if lan=1 then
- S( w/ d+ k1 l3 _3 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 f3 w- Q( v1 L0 B
to_str("in der Andockstation: \"",?.~.name,"\""));6 W7 x* R! I" ]' K4 W+ L
else5 N+ u" S5 {, E! l3 K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ U5 _; d, [$ i to_str("in docking station: \"",?.~.name,"\"")); % S( K" l4 k/ S" p4 W. U+ r7 x
end;+ }. \) ]9 V1 q
else
6 r- d, e5 }4 _* a' ^! ?7 w @.Destination := assignLObj[1,row];- @; j" [. V- T) |$ z) H \4 l+ z
end; 9 `6 `6 {' R. t. |) r1 a- _
newDirection(@);
/ b; U- ]! {+ {9 u @.HasOrder := true;+ c8 P# e$ b# E% c6 o
end;
3 _$ K8 n/ |' u' | end;4 N2 c) \4 j; |- d
end; -- of the method
9 t+ k7 g& M& `2 [( m. T |