/* called by: entrance ctrl of the object 'track'2 o3 M) ~( L ~9 b7 E4 r1 H3 C
*/
5 m8 w& I1 {* g! d, Z8 l6 z0 mis8 O- n' Q/ m& E% W# _0 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; a( D z9 w' g' g6 u9 Q: h# vdo( e |; V: R7 h8 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 V3 T* n; M5 n- A% |6 J if current = @.Destination -- else return
6 Y5 x9 q& k- W9 C2 F% x; d3 Q then- h$ e2 A; G0 N- c
@.Destination := void;
! E8 o1 H3 Z3 W: ` f if @.occupied then; R" s/ ]0 H/ ^* o! K2 S3 N, g
part := @.cont;
4 X( D1 W3 F) }+ _: b4 M/ G6 w @.transpOrder := void;
. ]0 X1 @- j# _8 m% R4 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 R- B6 m9 Q8 @2 S! \6 V, R0 B
@,root.eventcontroller.simTime);
; D" D2 M. k; K7 u. g! A @.HasOrder := false;0 M$ Q( }. \) m4 G `0 Y( A2 w: `
@.DrivingHome := true;
x/ Y6 E. p$ v9 ?5 k- Y' O) ~ rgManager.tryToStartTransOrder;
+ y% i; W3 V8 ]0 m8 G if @.Destination = void8 |) }* |: u/ P& D3 F/ E
then -- no transport order for vehicle @2 z0 C* @: J6 D; O8 U! J
@.Destination :=& r/ e+ d u3 u) S( }
rgManager.nearestFreeStation(@,track.~);; }% N! r& e9 b) }1 O, N' }
newDirection(@);
o1 }4 T9 v7 z4 R$ \ if @.Destination /= void then
% F0 p; J0 g2 z1 X6 G8 ~3 Y4 h3 w @.Destination.NumReservation :=
% c' T; h% V% G5 T @.Destination.NumReservation + 1;
2 W1 q. Q4 V2 T; t# T; x end;8 ^/ l6 N1 |! e3 V% R$ `+ f# z6 `+ Z) B
@.CurrIcon := "drivingHome";
" a v3 O6 l& l& }" C4 N* X @.DrivingHome := true;* j/ s/ |; c! Q# i
end;1 F' w7 O/ M. r' L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 H) n) k/ s' q* E9 q7 O( t
part := @.transpOrder;
3 ~& Q5 s* e% P W/ I/ H part.move(@);-- load part
! g" `8 M" b2 q; I& h" c. d5 R @.CurrIcon := "load";
6 I) j# X" E9 b, V$ p/ z GlobalDistObj := part.globDestination;2 S/ o# A$ t" d
assignLObj := rgmanager.rgAssignL;
( I8 X. U* o& z, J$ | row := assignLObj.getRowNo(GlobalDistObj);& s9 p) F! _- a4 P9 r) W
if Row = -1 then -- since 70 b3 V0 R% d: ^; N
if lan=1 then
5 L; E& [8 J$ B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) o! x% |- u4 ?8 q! N, w3 o
to_str("in der Andockstation: \"",?.~.name,"\""));
- _6 a1 t& ~1 a# p! y9 _5 V1 k P else
S' ~; N: t% ]8 ^2 q x- ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. N4 d# h" U% r to_str("in docking station: \"",?.~.name,"\"")); - j% i C7 R$ O9 V
end;* ~! S5 u' J) x9 }$ z3 x1 L4 L* y2 h6 [
else
" D; K$ [; c* J3 V& v @.Destination := assignLObj[1,row];) o8 l! P) a5 p0 z a
end;
% e2 U9 {7 R/ W5 n. V0 t newDirection(@);
3 U5 P$ e' l4 Q# p) N i# R @.HasOrder := true;7 p9 N, X) S9 L
end;5 ~+ F4 v! l9 l8 T+ i
end;! \& ^( B% @% \: C
end; -- of the method2 {2 s1 g% ^0 f1 Q9 X
|