/* called by: entrance ctrl of the object 'track'
# ?! Q2 ?! i- W- X! v9 ^*/: v& i T5 j8 f) W3 _
is
6 B% H. j* c6 d' p) f1 u7 Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 F, O, d9 Z5 E; P Y5 |: S
do
- U4 Q3 V: ~8 O; S! q# L$ I Lan := rootfolder.Internal.Tools.AOLlanguage;
1 `8 V+ q2 }6 J! r ?5 g U- L if current = @.Destination -- else return
! S$ ?/ R) p! f# W/ s' [3 V then
' z2 c7 h2 M! V2 ?7 i; e @.Destination := void;
b ^3 v1 Y& w r& v- ? if @.occupied then) r4 x- G: \1 a
part := @.cont;( @- d+ V# m. r+ E. e" ]: B4 I7 z
@.transpOrder := void;
5 v, e z. r9 l% a9 Q; ?0 u- u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' o; D7 A, ^8 q* v. S* v
@,root.eventcontroller.simTime);/ C+ D% o. U. k+ n; k O
@.HasOrder := false;
! X; R& |3 y' R) K& M+ Q. y @.DrivingHome := true;* _1 `! h9 v' i9 d# u) ^
rgManager.tryToStartTransOrder;
) r" a X" L, V& B if @.Destination = void
! {2 Q1 A0 ?6 y& H. g, g% Z( Z then -- no transport order for vehicle @
7 L3 _. J5 a# v7 G. I" v @.Destination :=6 m: F0 ?4 ]* C- x7 h0 q
rgManager.nearestFreeStation(@,track.~);
$ w) C' Q# d* W9 q' j newDirection(@); ' _* g7 Q/ M8 S
if @.Destination /= void then1 e: ~- v/ g9 o8 G6 i/ o }$ H
@.Destination.NumReservation :=
8 u$ z* i- @/ n; s M9 Z' o q @.Destination.NumReservation + 1;/ u% M4 `7 w1 g0 M' q- Z2 b
end;
s$ }8 E3 j& J2 } X# B @.CurrIcon := "drivingHome";
% R' y" x# c( y @.DrivingHome := true;/ A. u/ N! o5 J
end;6 L3 O; M; F; v. v) ~9 p& E8 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# w+ i4 c; {! q
part := @.transpOrder;
' \5 C- h$ g! |; q part.move(@);-- load part
6 f$ I( `' O# D! i @.CurrIcon := "load";
0 G# _- m! o9 N7 Y GlobalDistObj := part.globDestination;
0 I6 m4 l8 q4 b+ a0 y2 [ assignLObj := rgmanager.rgAssignL;
7 ~: g" u( P+ E: r" E! |! z$ y row := assignLObj.getRowNo(GlobalDistObj);4 i# U d, H' ]5 _$ p
if Row = -1 then -- since 705 ]% s$ J$ m# a& S' L. h
if lan=1 then* I! L! O' m8 ] x, |3 J9 }5 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ?. A: Z6 X& h0 ]+ i
to_str("in der Andockstation: \"",?.~.name,"\""));
1 }: d0 w( \ ~2 O5 r% q' y3 ^* X else
! f) y" ~( w5 d, [8 Q u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* @4 P- T& r$ m ~6 B' x$ V to_str("in docking station: \"",?.~.name,"\""));
' [ q! L0 T t' D- Z: A end;/ T5 {6 r) N- P2 @% D
else2 i1 Z% N; ^9 b* F
@.Destination := assignLObj[1,row];) O/ ^5 p! |3 M$ N' ~ N E# r
end; " p% j: r6 `8 A- K5 I9 t5 L; k
newDirection(@);- i& l9 V" @: Q
@.HasOrder := true;
* Y: M; H- Q; H3 `' f5 G end;$ g# s- H8 q" O# g
end;8 q" Z ^& i- u$ v2 e x O
end; -- of the method
( f7 i$ K) Z( f* }' d% }3 O$ Q |