/* called by: entrance ctrl of the object 'track'+ X% A# ^9 Y0 T! s$ V
*/% V; L0 Q/ g, Q0 P% S' N- m
is
( @# A: g4 U9 H, i) E part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 B5 f8 p/ o* b4 _1 d5 P
do
' X: M* C$ g. I Lan := rootfolder.Internal.Tools.AOLlanguage;
) u! h' T' p$ U" M5 h. G if current = @.Destination -- else return
6 o8 h% a% x J' {' f then! S2 _* J! w; f' O+ f9 Z$ J
@.Destination := void;
6 k0 B3 ?0 ]( ^- z if @.occupied then1 ~# y% X2 |0 j: e/ g
part := @.cont;
1 o' F, q. d" Q @.transpOrder := void;
& I/ Q1 V$ x1 x6 P! w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ Q H9 U$ }9 B @,root.eventcontroller.simTime);$ ^1 r% ?! A ~
@.HasOrder := false;/ ~6 `. c/ c' {; E: k% L
@.DrivingHome := true;
" J/ e% K/ g6 G$ G9 H2 ^: I: y rgManager.tryToStartTransOrder;- M' d* N, {. a7 t7 r% X
if @.Destination = void
/ F3 W3 a# a7 ^ f( ?" x then -- no transport order for vehicle @
1 b$ U' b1 r" |: b @.Destination :=) f/ Q" w, L* ?$ S, o
rgManager.nearestFreeStation(@,track.~);: ~1 i3 x2 s) m$ v+ p1 ~
newDirection(@);
: ?- `9 k. ?, i! { if @.Destination /= void then
0 N3 z% b) Q# ]1 V1 K. V* P: Z! A7 ~7 V( k7 ~ @.Destination.NumReservation :=, S, C! u. V5 e7 M f% T
@.Destination.NumReservation + 1;
! n) }3 z( f9 j" Y1 V# M end;
$ K" p. ~8 @8 a; E' { @.CurrIcon := "drivingHome";
/ J4 ^' ?- ]' i$ \3 U3 m @.DrivingHome := true;! Y7 z" x: T5 v, t
end;
" P2 S3 m/ z p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 E/ w# E- L" Q6 Y: J3 C part := @.transpOrder;
7 T1 g* }) m& E5 a: L2 C0 y part.move(@);-- load part( W% E% U" k. W3 s. u0 |$ y# y
@.CurrIcon := "load";+ u% b* @) V! l" ^6 g8 X) g
GlobalDistObj := part.globDestination;
( w9 D3 L3 u5 m assignLObj := rgmanager.rgAssignL;/ `; w# Y+ R& E. I* G: U
row := assignLObj.getRowNo(GlobalDistObj);
3 o2 Z, O) k3 ]8 |; @" X; F if Row = -1 then -- since 70
# m+ Y, |/ s/ c% r if lan=1 then
4 ^# a( m3 V: V& k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; L( O0 e3 c5 [. m, j& l1 b# S. C& g
to_str("in der Andockstation: \"",?.~.name,"\""));
6 M6 J. v2 U) ^0 J4 Q else# k; Y. [; ^- t. `/ u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, o- @- c- c' l5 ~8 P. h
to_str("in docking station: \"",?.~.name,"\"")); / g% I# b2 g- E5 U7 i, _
end;- l; B& S% s6 C# J6 o
else& b, v5 f$ B4 N
@.Destination := assignLObj[1,row];7 }! s% {7 A; N, C6 _
end; / b1 T7 ?( x7 A% O( G0 R* V
newDirection(@);
6 t+ \9 ?2 L" d4 P1 Y2 g @.HasOrder := true;1 S4 b9 r( l& V6 O) c. L; e& f
end;. I* a4 p! \7 I' W3 A3 }$ A
end;$ K) b! O1 g- u# K x- z
end; -- of the method
/ j# G! f8 o0 e2 D3 D |