/* called by: entrance ctrl of the object 'track'4 o( ?5 z5 `1 J1 N1 `1 `
*/7 Z( E' C$ b- H7 a) t0 [( f
is
. \( @7 Q/ i; @' f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 F* o5 e/ }" D* \% b6 ado
5 w' O# L7 W" ?+ |# _; P( |2 r6 I Lan := rootfolder.Internal.Tools.AOLlanguage;
, R; F0 l4 K* Y5 |* j if current = @.Destination -- else return
- v/ E7 W1 {3 q9 S then; q4 J$ Z( A8 N% Y5 |2 q
@.Destination := void;
1 R. g O6 a$ t6 q% W3 Y if @.occupied then
% F8 z' a* g% x* y, b- U part := @.cont;5 J& S1 |+ A; H
@.transpOrder := void;0 Z2 L- E# L! [+ O1 x5 N3 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* y5 l% ~) F$ W7 i: t7 M D& } @,root.eventcontroller.simTime);# }" q4 {- j6 l8 g/ \4 q9 H7 h0 ~
@.HasOrder := false;8 k- B6 N& c1 @, b
@.DrivingHome := true;
3 t$ P: x& x5 R rgManager.tryToStartTransOrder;
* o. ?! q; b0 K8 D if @.Destination = void) v! X' v2 R6 [" D% G' d
then -- no transport order for vehicle @
" q1 z; E- j# \% C# ?3 z @.Destination :=
0 z+ s7 U! U- P rgManager.nearestFreeStation(@,track.~);4 L9 Y/ N; {" }) i/ C
newDirection(@); ' b+ r n1 i- A2 W# T/ O, t% A
if @.Destination /= void then
' s) S$ k+ d( R* N- r @.Destination.NumReservation :=
+ `6 r& l- n! X @.Destination.NumReservation + 1;7 c3 ]7 F; S% k9 P) m, d
end; S2 \3 G: \' c$ W' Z/ h( L
@.CurrIcon := "drivingHome";: a2 {0 R( w, r3 H) }7 Z1 H; D
@.DrivingHome := true;: f" \: K4 P2 m; i3 H* ]5 E3 e7 R
end;
7 n. i" h6 X3 f8 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& |: }! J7 e) d% M# b part := @.transpOrder;, U$ k/ L; g4 H9 {) G
part.move(@);-- load part! A1 w6 _- [* | U1 \8 h8 |
@.CurrIcon := "load";
' X, C: s4 V9 B; _/ [/ H& y, t' K; W GlobalDistObj := part.globDestination;4 z8 T* Q) e6 u; T
assignLObj := rgmanager.rgAssignL;& @; P( M1 ]+ N
row := assignLObj.getRowNo(GlobalDistObj);
9 L; |7 N/ U& O, H/ t3 L if Row = -1 then -- since 70! O0 D, o# R4 B* ?6 J6 I1 I
if lan=1 then
9 j5 z+ l9 G/ w0 D- t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 Z0 ?, K9 X9 h$ Y2 O; v
to_str("in der Andockstation: \"",?.~.name,"\""));
% u7 l3 D$ y9 L$ x else2 h; ]3 _+ E+ y$ M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 } v9 I( A5 Y6 M6 I7 o: t& s
to_str("in docking station: \"",?.~.name,"\""));
5 N! ]! `( k$ Z0 C; D1 b& m end;. D/ E9 D. a' ]8 [% T
else4 s: n: Q. q6 i7 H% O, g
@.Destination := assignLObj[1,row];% a8 A/ D! A. O8 C; K( i
end; ( d; H4 W9 z2 Z9 L4 \ f
newDirection(@);6 U9 W# i7 f8 ]% a+ f, i
@.HasOrder := true;* l9 V' z* R2 q6 i" X/ n' ^2 _
end;: A& s" t) ^% {" t# F6 P
end;, v9 u: q' p( ]9 c* l
end; -- of the method
8 z% w: v3 I: }, C! k3 V* [ |