/* called by: entrance ctrl of the object 'track'
4 o5 E' F+ c$ K; ~, |/ O*/) U; U. V4 X( m1 K' t1 a* w
is6 S* c" d, q: K) l2 y7 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' W& K7 G% E. R& Edo* U% T1 f0 [# d, |" w# {2 q
Lan := rootfolder.Internal.Tools.AOLlanguage;
) K8 w0 ]/ \* `. @ if current = @.Destination -- else return7 ]+ J" g- s5 }6 o
then
+ e/ l- x4 [' E0 Z @.Destination := void;8 ~1 _7 M C8 b- [1 D2 v
if @.occupied then2 W B4 {" j$ O8 l3 [+ u$ c, }1 _) F
part := @.cont;/ `. ?! d" }7 [. A, C x4 r
@.transpOrder := void;
6 s' _7 U9 R { c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* r/ a3 M+ {( F0 w% ]8 {9 ` @,root.eventcontroller.simTime);
3 M8 M5 ~8 Q! q1 a( r% b, Z @.HasOrder := false;) v( V( p, G6 Q7 U2 h2 b# M
@.DrivingHome := true;
; ~ H# j2 W0 Y rgManager.tryToStartTransOrder;+ M; R5 N; I' c& c
if @.Destination = void
9 e, F, Y+ q5 b( W1 {( Z% h then -- no transport order for vehicle @
6 I( u; e2 E* o @.Destination :=$ `/ U3 c. V, q) ?
rgManager.nearestFreeStation(@,track.~);( l- ?& h, S3 j7 j: z* R6 T) {# J3 g
newDirection(@);
6 H t& @3 ]# m if @.Destination /= void then' n8 K! I# [: L" o8 ?* @+ i0 U
@.Destination.NumReservation :=9 M3 j/ `; G" T+ x. z! c! v$ \
@.Destination.NumReservation + 1;( U7 Q: B2 D' Z' R% G8 u
end;
+ V4 G, e3 v. N: r; O+ f @.CurrIcon := "drivingHome";
1 N% p/ f1 e3 [8 [" R# E) I @.DrivingHome := true;
$ U3 Z0 k1 z, T4 [" ] end;
/ ~3 ?0 l6 O2 e9 v6 s4 b, W" Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station- M) w- M- D. ~9 c8 n
part := @.transpOrder;& `3 m6 p3 I ?) ]5 d+ \
part.move(@);-- load part
! G9 W+ c& K7 L; Z @.CurrIcon := "load";( ~9 K% X' I" l7 T. z( |
GlobalDistObj := part.globDestination;; N: y k! r/ g/ z: j! E4 T* I& g" f( H
assignLObj := rgmanager.rgAssignL;
8 G5 t/ i) J0 g5 { row := assignLObj.getRowNo(GlobalDistObj);. B- f& [0 l; X" S9 N* l) p
if Row = -1 then -- since 707 J! ?/ @4 v) y. R2 }0 |6 j, k
if lan=1 then
3 [& a+ M* G- t- O4 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 O% |" n z8 g
to_str("in der Andockstation: \"",?.~.name,"\""));
& Y: O! D, s6 ` else
8 I: H: q M5 ]& v' V$ A. X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 X" k- q+ Y0 w8 f
to_str("in docking station: \"",?.~.name,"\"")); * q, Z* s( S$ ^% S8 i
end;
1 @; c0 u/ w3 `7 u3 ^% @1 ]% E5 V else8 ?9 L/ p- v0 d1 O' I+ W
@.Destination := assignLObj[1,row];- @8 v0 u j& b# F3 t7 g$ H
end;
0 I9 R: d$ z7 f0 }$ v3 E, J newDirection(@);
/ \- o" x! Z D+ Z$ X @.HasOrder := true;2 e4 a3 u$ ?/ _3 y: C7 A- |
end;
0 y$ _( `0 U0 [- o$ i k9 F5 R end;6 m( t3 y# O" Q3 T, _4 a
end; -- of the method
" o9 j8 G4 U B |