/* called by: entrance ctrl of the object 'track'5 @# {0 ~8 ^/ N# u# _
*/
9 {+ Q3 G! q( m$ l! Vis4 x2 N M* r1 q" v6 v7 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; y4 J) j: X% n$ J9 Vdo; ~4 `3 h' H% E& d5 {7 S b: n
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ R/ d2 ]; p+ F if current = @.Destination -- else return: {! u( c# \7 L% N3 l) k
then
7 ]/ r5 a6 _) I) j( F) i4 g @.Destination := void;3 I$ i E' ?9 A1 w2 |
if @.occupied then* o I7 v6 ]" l
part := @.cont;
) _. C9 h9 M+ ~* `0 c$ ~1 C1 ^1 k* _4 H @.transpOrder := void;) K6 [ x2 M: U4 S9 f/ E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: B. D* e/ p8 o p
@,root.eventcontroller.simTime);
2 F. c; k: \* ]6 M/ t8 E9 F0 v: J# f+ Y @.HasOrder := false;
5 m- D0 b: e* d% l& K+ _% f- T5 l @.DrivingHome := true;
4 l0 Y# h7 w+ G ? rgManager.tryToStartTransOrder;; f# L t( N& V; H
if @.Destination = void
* _/ R- H7 S- Z, d0 K7 l' d then -- no transport order for vehicle @3 w/ h6 ~; Z: m: C& d, F, G
@.Destination :=7 w4 Z6 W+ v$ k* Y6 m9 @
rgManager.nearestFreeStation(@,track.~);% z+ q( ]" }9 H) N2 c$ T# o" W
newDirection(@); ( w0 e* S" c' c
if @.Destination /= void then
) g7 f M- g* S" z4 d+ D7 d' ~+ g @.Destination.NumReservation :=
c& ~" e! k, C3 z7 F* z/ h0 H @.Destination.NumReservation + 1;
6 l- {0 v/ T" a end;5 {* t& Y N* {# z9 i; t! s
@.CurrIcon := "drivingHome";0 O5 E2 W- M' G) h. Z
@.DrivingHome := true;
, F$ ~0 ?* Y! H- Y end;
% V7 E& d) Z: s) ~3 d# h else -- the vehicle @ is empty, both vehicle and part are in the same dock station; G" s. f6 r. E1 n- W, e" T+ o
part := @.transpOrder;
, {: Z# @+ F G( y) A/ @5 b# N part.move(@);-- load part
/ |7 |' i H3 x% _% K @.CurrIcon := "load";. M; H9 K& m8 J) e6 l
GlobalDistObj := part.globDestination;5 Q) {+ [3 x) J: n/ k
assignLObj := rgmanager.rgAssignL;
! \2 G4 B1 n) a; k row := assignLObj.getRowNo(GlobalDistObj);0 o8 S) r- I f/ A) y
if Row = -1 then -- since 70
: |6 D) g) D3 G% r if lan=1 then- t/ A9 M. [2 V( Q1 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& L/ H+ r8 D* @ Y5 ^& S! _5 O: g to_str("in der Andockstation: \"",?.~.name,"\""));
! O4 \+ D! v+ n else
" L) s& i' S# n0 b+ K+ _7 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 A* U$ W" H3 E% E7 p to_str("in docking station: \"",?.~.name,"\"")); 1 N& @- s$ L7 @
end;
& v3 r, W2 s4 C: k; I K else
. _& t# [5 \5 V; d6 R @.Destination := assignLObj[1,row];1 v# f5 k% k/ B5 ]5 ^0 Q, ~7 x( X
end; 3 ?% {/ P* Y3 v! ]& B1 G
newDirection(@);
- ~% Y$ J7 g3 Y% g% \0 A @.HasOrder := true;
$ x1 E1 p; Y7 k- n; k7 ^0 ^ end;2 N" ]% _& H' I2 l4 u J8 J+ S2 b
end;
) ~! G$ W1 v j( b; qend; -- of the method5 L$ @4 _- U3 j2 c. U
|