/* called by: entrance ctrl of the object 'track'
0 o8 s; ?6 q. L; G. L. S9 [*/" h: ^6 v% H- C1 j& m6 z
is
8 H* u# `5 o: X, A7 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 u4 J6 f5 d4 O, `
do# Q- ^. q1 p* O, w j3 T4 H( [3 d
Lan := rootfolder.Internal.Tools.AOLlanguage;
R- X0 f+ D* B: K0 K! |6 e if current = @.Destination -- else return( K- D7 A3 D" C4 r
then
2 B$ S4 s$ f* e1 b1 R% ^8 H1 Q1 R @.Destination := void; D* x4 r2 k6 ~! q9 T' U
if @.occupied then, M2 {2 t' J' ~; S/ H
part := @.cont;* C, _- B+ y( C7 x7 k
@.transpOrder := void;( B9 ^/ ~0 o# O) C& x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 ?! X: V1 r, I3 ^
@,root.eventcontroller.simTime);* I/ G& y3 x* E% E
@.HasOrder := false;+ ^) D" \# r2 ^
@.DrivingHome := true;
7 c- i, {- [* V L$ V6 S. [* p rgManager.tryToStartTransOrder;. [, x$ b& l+ q" J5 C8 g& k# {% ~: o
if @.Destination = void- f) `; y) j% d0 R
then -- no transport order for vehicle @0 w3 G, F* R, n* k7 ^
@.Destination :=
5 P; ?# R9 Y% _% I3 j rgManager.nearestFreeStation(@,track.~);
2 G7 m# l8 o6 D newDirection(@);
, @5 d9 E6 @# v0 H* {) J4 k if @.Destination /= void then
9 F" o) o; F, T6 P5 j2 N @.Destination.NumReservation :=
9 A* S# Y5 ]/ C9 k+ K @.Destination.NumReservation + 1;
; e1 C: N) W# w6 n+ m end;' C/ M/ F) t2 M" }% h
@.CurrIcon := "drivingHome";
; `& M$ O2 N! I1 v2 c! N @.DrivingHome := true;
2 M: }( v) r# ^5 d5 h& A, s end;
0 X# A' S2 p8 j; o else -- the vehicle @ is empty, both vehicle and part are in the same dock station! z% O1 q- w9 q% c3 u- T
part := @.transpOrder;
, i4 C& B7 u! I4 X part.move(@);-- load part
G7 z. v" T% ]5 z* k a @.CurrIcon := "load";
5 }+ s$ q/ w- f/ e8 F GlobalDistObj := part.globDestination;
( u# h1 m6 c4 [2 @. _ assignLObj := rgmanager.rgAssignL;) E" Z9 D2 O0 J( n/ M6 `7 z- y/ {" z
row := assignLObj.getRowNo(GlobalDistObj); K9 g- g8 j7 p1 i7 C
if Row = -1 then -- since 70
8 l' { f3 t3 w5 o$ g if lan=1 then# y/ \/ O3 g; W& \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ E9 I% q! J* d* s9 X$ y to_str("in der Andockstation: \"",?.~.name,"\""));
$ }" N' q% T. R( S2 i else
$ [* g- a" M' X) R, @% T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 }% ?4 Z: V/ y2 z F6 _
to_str("in docking station: \"",?.~.name,"\""));
+ c9 `. c' U T. j& q end;' Q9 e) t) q" [: p6 Q( L3 }
else
" H& P; V# f6 i' I @.Destination := assignLObj[1,row];
, F/ M# B+ W* | end;
# Z8 ?* \6 C# v' J$ Q newDirection(@);5 l# n. v; t6 E
@.HasOrder := true;
& O0 `2 S- i7 W% U4 e+ W4 ] end;4 m9 T ?/ c r
end;5 x" H$ y5 g4 p1 k% C
end; -- of the method0 E1 k7 j) p8 r2 f$ }! o
|