/* called by: entrance ctrl of the object 'track'2 @; {8 p* m% U: P
*/
5 R2 i' M0 w$ Y& [# u: x1 Q) \4 w3 P; Z- Ois
# F5 w. J2 T( G9 c1 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 |3 N; F( L" I( _: ]) t0 udo
3 i* f' H* t$ Z1 _0 l6 h$ P Lan := rootfolder.Internal.Tools.AOLlanguage;
# z5 H& ?2 O! P7 f1 z if current = @.Destination -- else return8 C' j+ Y: p! u6 ^8 X
then7 k1 d# ]% q% U7 v8 `" R
@.Destination := void;
% b$ f: ]0 z; k& `/ ~ if @.occupied then
: c; G) {- ]0 G( y" I& K6 N part := @.cont; Y8 f$ `- }, F$ |
@.transpOrder := void;
+ d: b% g# o2 G% c! C8 r' F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* \! W- A. z2 h6 u9 [+ i @,root.eventcontroller.simTime);
' Q" b$ `# [# K2 ~$ T) s. g @.HasOrder := false;
0 O8 t J! L8 l3 C { @.DrivingHome := true;8 c, y. P0 G7 X! ^+ M+ F" G
rgManager.tryToStartTransOrder;: B0 ]% T9 u( J
if @.Destination = void% B" B! e* a8 O B# h1 \
then -- no transport order for vehicle @5 i# x- j" o6 U: M
@.Destination :=+ v: g! o9 h9 c' Y5 b; P# ?) S
rgManager.nearestFreeStation(@,track.~);
8 p0 G& p+ R7 |. t; R7 ]+ o newDirection(@);
* M( h6 }5 H+ o! h if @.Destination /= void then
- B5 W5 Z- t; [$ g @.Destination.NumReservation :=$ M) S* k. B- I- U
@.Destination.NumReservation + 1;& }* v" H9 S- B( ^
end; [7 z$ V2 D5 H9 r
@.CurrIcon := "drivingHome";
& V, v9 }- D P @.DrivingHome := true;
9 ?# L4 t f4 N% u8 A S; N, p end;
' l; O! h0 u- G# O2 L2 R7 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 c2 I2 t9 o" J+ a3 ] part := @.transpOrder;
, k* I2 j6 u d1 m part.move(@);-- load part
/ k- b6 H Z, R! [ @.CurrIcon := "load";
2 W& X3 o* ~6 m% s4 ^1 O GlobalDistObj := part.globDestination;
4 W3 ]+ V1 r) ]# z! K3 A8 X& M0 u assignLObj := rgmanager.rgAssignL;
& G* M, I6 v/ a3 U row := assignLObj.getRowNo(GlobalDistObj);
8 V& ^$ _# g0 L2 O& G if Row = -1 then -- since 70' @) s! M* W7 U# j# ? R) }
if lan=1 then' V1 n2 j+ E8 [4 f: W8 ]& v6 s$ ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ^+ o8 G9 t; c" z2 L to_str("in der Andockstation: \"",?.~.name,"\""));
, K" L- R7 w; A else
2 q% ]! D/ x+ V1 I: o8 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ]7 c/ H2 G# U% v, ?$ p/ \- ~7 J! n2 V
to_str("in docking station: \"",?.~.name,"\"")); . j9 P- n3 A# J* X* m& F) t5 h' z
end;
, O$ z" E, w# _3 B else- Q9 ~, v+ J1 A/ E [
@.Destination := assignLObj[1,row];0 H; \/ z+ E- E( m
end; - y ^$ j( h* V
newDirection(@);
% y- h' E1 {3 q) { @.HasOrder := true;
3 j- E5 z6 F3 ] end;; U7 L. H3 T6 {) |& g8 \& B
end;5 e) Z; `& |/ ^8 L( r
end; -- of the method+ S% N- f5 u; e- |
|