/* called by: entrance ctrl of the object 'track'8 ?" }! a/ }+ o+ p3 |
*/* l/ f' {% k o" L, o
is
5 v: V9 q2 E6 i* c, D part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ f+ c5 b/ P8 a1 B. ~
do. g d' x* w5 N( B+ C' g$ [5 d
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 r8 Y4 A/ N2 t1 G$ f3 {% p if current = @.Destination -- else return
+ u+ j3 F7 ?. E0 V; ] then
# j) m; ^9 o( C# } @.Destination := void;
]$ Y* } |2 H if @.occupied then
: P5 J5 W1 Q& l+ Y# W ?/ N part := @.cont;
# L/ C6 Z2 C* z2 b @.transpOrder := void;
7 A2 i& O: E+ H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 r! T8 F) F- F2 K5 a) T
@,root.eventcontroller.simTime);
% C3 R6 S3 h% }$ v* N$ b4 C/ y @.HasOrder := false;
Q9 N$ Z) @- M* K z @.DrivingHome := true;3 T5 q0 f7 F2 ]! C
rgManager.tryToStartTransOrder;
; o. L8 [1 @7 g: n1 A g% U if @.Destination = void
6 g1 L* s% B9 s8 V6 `/ D) g- ? then -- no transport order for vehicle @3 v, ]% K6 ?" g# u
@.Destination :=
9 Q/ D O6 T5 {" I1 M1 v* p* { rgManager.nearestFreeStation(@,track.~);
" G( x8 E; A- M( ]. N, s1 ? newDirection(@);
1 U# T, V/ [, x, Y1 T3 i' I if @.Destination /= void then: n$ `5 j2 s7 Y. c
@.Destination.NumReservation :=
+ {, S r2 z& x A5 |5 O4 K* t* w, ] @.Destination.NumReservation + 1;# l8 Z+ T) M8 k& K, [3 [( B
end;# i, b# p7 q* W/ Y) \" s( i
@.CurrIcon := "drivingHome";
( ?# @1 H7 l% n( d @.DrivingHome := true;! Y3 i" ^9 ~3 w) B: }4 H
end;+ e2 ~% f. a" Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 ]; l# K" S/ \% j, i( H7 C
part := @.transpOrder;
" F7 C9 e, {- z3 C+ m% B: s part.move(@);-- load part
2 U% O" \/ P7 k- _0 Q. y @.CurrIcon := "load";
' M3 e/ h) U0 q* A$ l* | GlobalDistObj := part.globDestination; h) p. |0 H1 n& j7 S! j# h1 p6 P
assignLObj := rgmanager.rgAssignL;
: N$ m/ X, D7 b/ { L row := assignLObj.getRowNo(GlobalDistObj);
* w- N2 S' ~' c: L. a if Row = -1 then -- since 70
- T/ Q9 `, }# e5 x if lan=1 then
2 g6 L" V' m+ O3 @0 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 o2 y: {7 }4 J c" b: F) E: A
to_str("in der Andockstation: \"",?.~.name,"\""));& j; A% H7 y0 ~9 l+ h
else
: \; W2 O. E- r. K) G! N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 O6 i6 d8 `7 e8 a; p
to_str("in docking station: \"",?.~.name,"\""));
- ]5 t. E& }0 |- |4 e5 c. _ end;. O2 V3 K+ r9 W' C/ m
else
2 s0 D, p1 i$ S( P ?8 q @.Destination := assignLObj[1,row];
! p& Q1 q3 V$ E end;
. t) h" c3 Y; V; p3 r6 \4 K newDirection(@);
1 X# R" N0 p) j( L2 O1 A @.HasOrder := true;! C0 |- `/ L# S! [ u: ? r9 S
end;0 x3 f- d# n* K+ P, I8 y) U5 D
end; w( n; H/ c8 V4 a+ \. e9 j# a
end; -- of the method5 }; g: w# ~: r; [0 h) y
|