/* called by: entrance ctrl of the object 'track'2 C3 m% S* _- [% H. l" Z, k
*/; j& J8 {; o/ u- B7 I5 P
is
3 N7 e- ], l* x% ?) T$ j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
q/ v' s. I1 K3 p# n& {& mdo
& F# B. B f3 j9 {7 v Lan := rootfolder.Internal.Tools.AOLlanguage;- V& k# A5 l( U. v' T( {* i
if current = @.Destination -- else return% Y5 p9 L' F# G) K7 w9 Q7 g
then" }* l e4 B1 s# Q& z$ X
@.Destination := void;
9 K' r9 s, I' u3 q8 C if @.occupied then( S( o4 d; i" u1 g- O E
part := @.cont;" e d; x7 U& q* g& j; L
@.transpOrder := void;; V. ^! Q) E- V( H4 v r+ [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) b. h/ E* ^8 A/ m+ m @,root.eventcontroller.simTime);
. ?, I8 a8 P; T0 c @.HasOrder := false;
/ W) L; N- X: q, T @.DrivingHome := true;
: t w/ z; e$ G0 Z+ ?! D8 ^! K rgManager.tryToStartTransOrder;
9 H- @! |6 g" X$ R% S if @.Destination = void
$ v% W3 m& W' H& L# z* V" T" n then -- no transport order for vehicle @
$ _# F% }: }0 v @.Destination :=
0 u% d$ R8 v' u7 n9 J# ~( ~: r rgManager.nearestFreeStation(@,track.~);
' d% Y" N7 X# D7 t/ f3 d. b$ o; { newDirection(@); " h8 J O; @, |. R! t1 X% F% s" S
if @.Destination /= void then9 R, [# p9 @7 L, ^
@.Destination.NumReservation :=
0 P3 m3 @" O7 X( T q. Y @.Destination.NumReservation + 1;3 C3 Z) v. m. _& ^; Y/ b( v6 v
end;5 d, c+ N' d) D/ d
@.CurrIcon := "drivingHome";$ j: ?% S. K+ ^- _& h) b
@.DrivingHome := true;% t/ J$ a& n8 h8 N* `2 Q
end;
. W7 x. A* ~$ j* } \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station; e- y K: N7 K. d$ p
part := @.transpOrder;
Y9 F* n* t& m7 d. ~ part.move(@);-- load part/ y) i8 K1 O% V/ e* s( t
@.CurrIcon := "load";( T5 T# d7 Y3 J/ R2 K- z( I" I" J
GlobalDistObj := part.globDestination;- H; A+ A A% B) Z4 I, F
assignLObj := rgmanager.rgAssignL;4 E/ p2 x; Y3 S- s9 s% |
row := assignLObj.getRowNo(GlobalDistObj);
4 E7 V7 F4 d+ n7 T+ j if Row = -1 then -- since 70
+ ~% a$ d% C% s* E if lan=1 then2 c5 W3 M9 {$ B z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! L b) \9 S ] to_str("in der Andockstation: \"",?.~.name,"\""));
1 _1 s1 |* w* N9 Y. w else% ~$ J I3 j6 Q- |% |% U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ N9 V3 e/ K {" J* Q
to_str("in docking station: \"",?.~.name,"\"")); ( j. A/ ?+ G* V0 {2 x% z, k: g
end;9 Z0 k+ ?, [/ s" X9 J) `
else
, ?0 n2 v# o; j) U. p% ^8 ^; Q( J @.Destination := assignLObj[1,row];! G+ N: e' ~ C# Z* W4 c1 |0 R. f
end;
2 X( G; G9 W8 Q7 w4 F newDirection(@);
: v8 V5 X- b+ K! X: [; ? @.HasOrder := true;2 x: L+ Q/ r- L( L9 d
end;8 E2 @- r) \* J$ u( e
end;
+ b6 b/ L+ y* V# [3 Gend; -- of the method. l; S3 U$ V4 _8 p8 g! ~
|