/* called by: entrance ctrl of the object 'track'" v/ x) {$ e, P; P
*/- Q+ a8 ]7 U# I# W% `/ ?+ Y
is
+ p! X# C5 w2 n; `) D0 o" ]/ X$ K( w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 X# h( a/ U5 q/ F0 X ddo
; h; d7 i% N B0 o( f1 U" y Lan := rootfolder.Internal.Tools.AOLlanguage;
0 z) `6 b4 {, W; A. q* C s if current = @.Destination -- else return
* `1 `+ e D Z8 { then
+ r; p. [: O* U1 g0 L, o& f( w, a @.Destination := void;
, F C) q4 M3 r0 Z) K, i if @.occupied then$ {- ^% w" R0 [6 |2 Z3 w
part := @.cont;
, {% M. j; `: ~7 D2 d @.transpOrder := void;5 _* Q" d8 W; t6 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% q d7 p+ x+ ~: T
@,root.eventcontroller.simTime);
3 A9 P9 S" ?) ]. a! z& \ @.HasOrder := false;! ?; H* C$ u& W9 L* ^3 a
@.DrivingHome := true;
2 V$ Z7 b3 W( s8 C# J rgManager.tryToStartTransOrder;
- h+ o$ m8 ]' d# A. v if @.Destination = void
( @/ t3 Z# _7 t3 D4 J1 Z8 z then -- no transport order for vehicle @
& m/ I* \% A* i8 S# { @.Destination :=
' q# c( E) z# } c rgManager.nearestFreeStation(@,track.~);& O8 F2 r# e; [1 I! X
newDirection(@);
; i3 T) k; A/ M- f. E D k if @.Destination /= void then
$ f) P0 b" z* e. a2 X @.Destination.NumReservation :=9 U) K* W4 N! @8 x0 n' [2 D. b
@.Destination.NumReservation + 1;
3 R% Q* p/ V! x" I$ w end;
9 u O) ^2 c, A* L @.CurrIcon := "drivingHome";
/ F3 l8 D+ w& q1 Q& a" z. O9 ^ @.DrivingHome := true;0 T' I4 l1 ?# R1 m
end;$ u w* T/ ~! ] j/ s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' g6 ?+ U" _: p, k' e4 z" n; Q: a part := @.transpOrder;. a5 U5 q3 D# l% H9 W, B
part.move(@);-- load part
7 C3 k6 Z/ ?2 F2 u9 Z/ s+ S* } @.CurrIcon := "load";
. B1 |& @' U' d G GlobalDistObj := part.globDestination;( h& ^6 y O: y+ o
assignLObj := rgmanager.rgAssignL;" H n" P4 j$ F: S. L9 r7 F; S
row := assignLObj.getRowNo(GlobalDistObj);
. f, v6 }) n. T% N. f if Row = -1 then -- since 703 |7 L( s8 Y- X
if lan=1 then
2 i! F. F' @0 p% e& h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," W9 M+ M: F1 q9 I, |
to_str("in der Andockstation: \"",?.~.name,"\""));
( @- a' }2 p* m/ F else
$ s" J. @2 c% ?* z2 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 b, p6 p8 L$ ]/ G- v. x6 } to_str("in docking station: \"",?.~.name,"\"")); ( q$ g1 s3 v+ \
end;6 @& F, d& ]7 A% M
else* X% E F# e4 P. w2 E7 T2 r
@.Destination := assignLObj[1,row];/ {$ o4 C8 r- Z$ H) a6 ^4 l
end; 1 d5 P+ `4 M# T) ~( \, o
newDirection(@);7 L- p4 B+ o8 O8 |
@.HasOrder := true;
8 `1 k; |4 k% \6 E end;
3 a. _, ?( I# M8 L end;4 L7 ~+ w0 \8 e. t" n% t0 p
end; -- of the method1 E. }# m$ B1 v) k- z! [4 J! O8 d; r
|