/* called by: entrance ctrl of the object 'track'7 M0 G4 V- n' x: P4 y( z6 ], M
*/5 e+ k! a& L* T0 |6 m
is
0 M. x# t2 ]0 f' M+ ?* C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 q/ o9 z; n I( g) W# j& `do7 O: j4 G/ A# ~" O# w
Lan := rootfolder.Internal.Tools.AOLlanguage;
( N% t4 Y9 O: Y) k+ \& L2 S if current = @.Destination -- else return' m8 B) a, t( T1 k( L0 ^ m( m
then
/ F% P+ N: q3 Q @.Destination := void;
" i2 F) G( I% l% r if @.occupied then2 h% @6 y; \6 J5 n5 W L. ]
part := @.cont;+ p$ y$ i, J7 s& Z6 f3 r$ `
@.transpOrder := void;
/ t: B- z& d4 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ R- x2 c9 v R& K% J( V* k
@,root.eventcontroller.simTime);1 u. P7 S% i: E7 {8 P: S
@.HasOrder := false;
& w* ?- v7 J+ b0 m7 ^/ L @.DrivingHome := true;
. v, N. H" r' v2 j rgManager.tryToStartTransOrder;
6 V8 N! ]3 v$ Q9 l b if @.Destination = void) I4 p9 B+ a9 o/ I5 ~
then -- no transport order for vehicle @4 Y( k+ {3 L0 \/ ]
@.Destination :=4 q3 u# d! v7 d. ^7 Q9 c$ y: V
rgManager.nearestFreeStation(@,track.~);9 V7 o$ H& E5 a$ U; N
newDirection(@);
! u6 W% p' d( C/ B) F1 Q& @ if @.Destination /= void then
% H' V! P; @8 j& \/ r4 C @.Destination.NumReservation :=
6 t0 X! P* T! n @.Destination.NumReservation + 1;
# O M5 u; L/ a end;
' S: s, X" q5 k9 j4 r7 C @.CurrIcon := "drivingHome";7 G f. n. M8 _1 }$ b
@.DrivingHome := true;* E0 ]' M' o2 E& |: A- D" [
end;
3 z' o; ^1 [0 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station" R/ C6 d0 Q3 [/ B ^
part := @.transpOrder;
, b3 U: H/ @# v& B. k9 I part.move(@);-- load part2 q) {" \' w% c3 m7 m* t. u) [
@.CurrIcon := "load"; { p S' C/ ~% f6 T) c
GlobalDistObj := part.globDestination;
* `7 R; `5 k. e assignLObj := rgmanager.rgAssignL;
* U* w* H- s6 H9 R0 a+ Q6 z0 T row := assignLObj.getRowNo(GlobalDistObj);
0 {/ p- H# k# F1 M if Row = -1 then -- since 70; M& B6 a* a( _3 |: G$ R1 E
if lan=1 then1 j* u: O+ b9 @/ ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 V8 |" U. ^$ a) v
to_str("in der Andockstation: \"",?.~.name,"\""));/ H" o8 E* E) B
else% [- d* @8 @- [; z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 {) ?+ s; L. K to_str("in docking station: \"",?.~.name,"\"")); 7 O4 v' I3 I2 H& P- f0 v
end;
9 H% p9 m- n( N! H else. r4 r, X& h" Y ~. B1 n" b+ D5 D% l/ L
@.Destination := assignLObj[1,row];
$ ]) @6 c* T( P7 Z end;
, e3 i' \- a P( L; f newDirection(@);
* ?7 [" L. A1 N' \$ h$ ~! | @.HasOrder := true;1 r. f& _; a4 m$ b3 Y
end;
2 Q# @7 M, F' I1 c1 R% f4 i) I end;
_/ g: X z( b3 @end; -- of the method
. X4 _- d% `( g t5 } |