/* called by: entrance ctrl of the object 'track'
4 A% l5 d8 }5 e @' X. g! L( B& a9 O*/# ~& `; M, n/ J# P# T0 o
is
. w0 t! l2 Q6 Z7 t( L$ @9 d% f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ }* y- t# }# c- ]0 i0 }: y% N- p0 ?do, `3 ?0 u: ~; a d+ k
Lan := rootfolder.Internal.Tools.AOLlanguage;
- ` R/ z& `9 K: f9 M% B if current = @.Destination -- else return, i* W4 ^9 \! K1 m$ l
then+ O0 }0 _ V7 r+ y
@.Destination := void;7 v9 S* N4 `( f8 g1 q
if @.occupied then
+ v' J3 Y6 V# n; K; H1 t# I* l6 `. j part := @.cont;: I, K0 K8 H1 e% r0 T# V! K
@.transpOrder := void;
! [+ h* x# T( m- J A. s+ j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ z! r- N! d# h4 q! F
@,root.eventcontroller.simTime); X2 E% h d" D* [/ K0 {6 o3 y
@.HasOrder := false;# G" n2 u& b" ?( X6 g9 `5 W' y
@.DrivingHome := true;
/ h9 Z% p F4 P2 O+ F5 r rgManager.tryToStartTransOrder;% j* E9 W9 o& l- U0 I
if @.Destination = void
% H' ~( P! N2 Q" q. s" E/ N9 H1 X then -- no transport order for vehicle @$ V+ K& r! U( {% H* R
@.Destination :=& q, P: T* L% b
rgManager.nearestFreeStation(@,track.~);3 ] }* O% w+ u) k
newDirection(@);
2 g4 V4 v3 C' x' ~2 u if @.Destination /= void then5 n5 w2 M2 C t/ H0 n) \! N
@.Destination.NumReservation :=5 R9 g4 d v7 e9 m9 y: m
@.Destination.NumReservation + 1;
' |# W# Q7 M+ ]0 z6 e# F. D/ z end;
. [ x3 t* R7 l @.CurrIcon := "drivingHome";8 c i+ J1 e5 d! d& ]: e2 g
@.DrivingHome := true; J( r4 ~% t# G
end;
6 W6 E! S. y6 I+ R, }* `+ H( C4 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. ~ q) t6 L$ q) Y3 Z part := @.transpOrder;
$ c2 A# o5 Z7 L6 X6 i1 }9 E1 A w part.move(@);-- load part: w5 i9 q \% e1 I1 c& {1 ?
@.CurrIcon := "load";
- {# k( ?6 k* s1 K/ u GlobalDistObj := part.globDestination;$ l( Q5 z' \4 Q& N4 B
assignLObj := rgmanager.rgAssignL;: Q2 K4 A# D8 K1 i' o" O" x% [
row := assignLObj.getRowNo(GlobalDistObj);
% O N8 V R$ C# a% a if Row = -1 then -- since 70
! P! P% w3 [4 a" K5 v# Z8 ` if lan=1 then
1 ]8 h7 l8 D: b+ g! s. N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 \+ n* B" h+ w9 q) j7 X
to_str("in der Andockstation: \"",?.~.name,"\""));& v/ w' L$ Z* a7 J
else
1 o) Z+ H% m. o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 t, ~1 ]6 \7 c to_str("in docking station: \"",?.~.name,"\""));
8 V/ J7 m) V; M7 { end;
" W$ p% N/ a/ { else S3 D0 U- @: k& z4 X. S/ F
@.Destination := assignLObj[1,row];( @" ]3 E% @* ]$ y* z
end;
: h: U& E. `) C8 y( t0 o newDirection(@);# }+ W3 K# @- A, }
@.HasOrder := true;# l% q+ u4 u% I9 p4 {) l' b1 L
end;2 r5 T8 n4 U( i7 t/ n
end;
2 S. h8 n( ~& P# Mend; -- of the method
2 q" A3 ~2 C! C1 r |