/* called by: entrance ctrl of the object 'track'
& O1 o/ F! M+ X0 X4 y" @& t. d& h9 \*/8 D1 A* [0 c# g' ^4 i' J; \5 d
is- T0 y* n" W' a" \) T" o* d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. W4 o+ ]) W8 D2 h; ^ o
do( _( {! @4 i2 F) ]7 N
Lan := rootfolder.Internal.Tools.AOLlanguage;
' G7 G. x7 }7 [0 C4 A& {* D; m if current = @.Destination -- else return
" j/ F6 b& n% Q- s0 D4 l% U1 ? then( o% p7 Z n- b5 r6 Q; a7 ~
@.Destination := void;; B$ Z% q" Y. [0 A, E7 V7 O8 q
if @.occupied then
8 k2 f& `- j* r3 C part := @.cont;# V$ w* O. w9 _8 ]
@.transpOrder := void;/ v6 F4 x1 e# T- H! [6 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# l4 V, n9 F' T$ B
@,root.eventcontroller.simTime);8 X' I6 r* ~7 W3 E
@.HasOrder := false;; C; y$ f) |' `5 S1 H k
@.DrivingHome := true;; O7 y$ \ A/ _7 T
rgManager.tryToStartTransOrder;/ |7 C; H* ~; y& s
if @.Destination = void
+ Z' w4 l( j$ S then -- no transport order for vehicle @* N" F' V' @) `7 n* e
@.Destination :=6 J5 {% }" _- o, S. g- a9 P
rgManager.nearestFreeStation(@,track.~);
) y' C+ t7 t! h8 s9 M: x+ t9 a newDirection(@); ! C: P% s) {! ^, s
if @.Destination /= void then
: F5 b5 k, B& r ]5 v$ X& y @.Destination.NumReservation := j8 r6 {7 s, A1 F5 ~3 V, t
@.Destination.NumReservation + 1;8 k t7 v2 W% O" P$ E/ W2 o2 z
end;
6 ^, k4 z# |& O# M% S8 u @.CurrIcon := "drivingHome";
0 P3 I# x% _7 O( @. L @.DrivingHome := true;9 L; p) W8 S5 T, b& i% u& W0 f2 T
end;
7 r$ E0 B7 {. r6 k6 d, U0 _- e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 X$ i. }. A. G3 e part := @.transpOrder;: A5 b6 ?" y9 G+ W* V0 y1 m2 M
part.move(@);-- load part
3 Y- B, U# k" A8 t$ r( n @.CurrIcon := "load";3 Y3 Y; r3 Q& \8 _0 n
GlobalDistObj := part.globDestination;# _6 @5 p# }. B# |/ A( \
assignLObj := rgmanager.rgAssignL;
( ?* n2 ?- \) c" q row := assignLObj.getRowNo(GlobalDistObj);
9 u8 f6 m# [* b, `6 C9 k if Row = -1 then -- since 70) Y, t' `7 r5 A- m
if lan=1 then! Z: @3 N$ Q* G9 J& g/ M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" z" ?) H8 Z% w; N1 X7 q/ T to_str("in der Andockstation: \"",?.~.name,"\""));
q' @4 m4 a& h r1 v; U, R else- p3 k* {0 `; O) F/ ^& T/ \$ m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 t7 R+ o3 M' S; x$ U V3 \/ l: K
to_str("in docking station: \"",?.~.name,"\"")); ) {# l- J7 D5 Q- J$ Z+ u
end;/ F) s3 i% W% |/ H
else6 L6 ^ J+ a! z! c
@.Destination := assignLObj[1,row];
+ D9 x; h8 P" r' y8 f0 N( I end; . [- K% ^6 h/ E2 x8 b3 w' E
newDirection(@);4 \' O" i2 \. [4 {& b1 q+ }) y
@.HasOrder := true;9 i0 _; y2 Q3 i% y
end;( f* c) c) u2 U, `- _: u
end;
+ O# j+ K- f, [9 O5 W Rend; -- of the method
" ^6 H2 ^) Y% ?% c |