/* called by: entrance ctrl of the object 'track'
1 {6 R, P- P# x, M. d L' c4 G% ?*/6 p9 `" L3 e8 S/ e! b
is
2 l5 X$ w5 |2 w- S part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! j( U- z' V7 N# a0 p' Sdo9 _8 i% s4 z0 k& s C4 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
( s. e0 X) b& [2 u$ x l6 L* } if current = @.Destination -- else return p& A1 E5 W+ R! D# E. o
then
' r) R. |% B% O3 J! j& X @.Destination := void;6 J! q6 t: H. F; C; M
if @.occupied then9 r8 O$ g3 A8 a7 S5 d' N( B* F
part := @.cont;9 `$ k* u' l# u) j# f! e. A2 _1 b& S) w% p
@.transpOrder := void; k: P& @1 }% ? }' U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ u8 q+ b) g& U2 o
@,root.eventcontroller.simTime);/ N) `* }! V+ v! d5 C. [& F( S
@.HasOrder := false;
2 L" \. k+ [- ?1 e; _ @.DrivingHome := true;
8 h) A* v _* g6 G) q. B4 N rgManager.tryToStartTransOrder;# v# [1 b) s- U4 z( m
if @.Destination = void
+ ~1 P) B$ h4 f% X then -- no transport order for vehicle @' m9 B% w9 F" f2 ?( r2 t
@.Destination :=
' A! P }# l, F' ^% z rgManager.nearestFreeStation(@,track.~);+ T- D: D& d0 a' _4 G. C5 v3 m* X
newDirection(@); 7 i9 E/ C( o: ]
if @.Destination /= void then) C2 d4 f2 q N) M" `+ L. y
@.Destination.NumReservation :=
2 w$ P) w* e- ~9 I2 L' g @.Destination.NumReservation + 1;
2 r5 ?' ^8 X. ]( Z1 A$ [ end;
1 @5 Z3 s. o) `' X5 e @.CurrIcon := "drivingHome";) x7 U% E6 I! ]: B
@.DrivingHome := true;( o ]; f$ N" a* J5 T& P3 z
end;
7 r* k2 A0 q& ]) p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 Q* T( D' Q4 x part := @.transpOrder;
: t4 ~& r, o& E$ ~ part.move(@);-- load part
4 R1 ^% U1 q6 s" R# x4 g5 I @.CurrIcon := "load";, ~6 @5 Z4 m( U% b. r
GlobalDistObj := part.globDestination;+ o% T2 p. z4 [7 [$ k" N0 s [ M
assignLObj := rgmanager.rgAssignL;
$ s i2 p9 u | _+ D" ~8 f row := assignLObj.getRowNo(GlobalDistObj);
% n4 z& K* D. M1 n( a if Row = -1 then -- since 70
" K Y' \* M7 @$ _ G% l; \) } if lan=1 then- I* ]( J$ R' b+ [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 d; v) m% I8 B9 n: H& N! y
to_str("in der Andockstation: \"",?.~.name,"\""));
4 B8 L# o U2 ]8 m, y else# K& S2 S% a$ {" D, _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; ^; O5 S+ S% p0 q' X
to_str("in docking station: \"",?.~.name,"\"")); 5 m# U5 N) S7 n
end;
% O/ `8 K4 P3 j else% R9 M; }$ S. y T
@.Destination := assignLObj[1,row];
/ X, }( f z# i: J end; 6 C7 E3 T2 R% o, ^# [! i8 M! u
newDirection(@);
( }7 Y' j) S$ } @.HasOrder := true;: \6 p' ^% `2 t2 g* ?/ E
end;) R$ Q. Y4 N8 S( z6 n0 q0 y: S
end;
e' y/ Z! ]* q2 C7 Mend; -- of the method- {: T1 j, ^7 L5 q7 o+ d
|