/* called by: entrance ctrl of the object 'track'$ f5 D$ F/ E& _
*/9 Y3 s! V: |" x8 B' z/ ]
is
/ ?; q, R. a9 y7 \- l1 H! y part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 T" \( ~9 V) S- t
do4 e: V- n1 ^6 A( ~4 x' g9 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ s7 [, c. Q+ W! \& b0 ? if current = @.Destination -- else return: i' k, K- ^; J& a' z d) Q
then
; A2 ~: r9 k. {6 K- p! V0 U @.Destination := void;( y t1 P/ _8 Z" i
if @.occupied then, i0 F4 S3 y! @$ ?* y$ n+ g8 W! z
part := @.cont;
% D. |" g1 k" @2 @' N$ { @.transpOrder := void;
' @5 h: ?4 \. ]6 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ^1 u) r1 h3 {
@,root.eventcontroller.simTime);
5 m. E7 J: c$ S7 A% k @.HasOrder := false;& l# ~3 a' g) h( `7 }6 |& v6 u
@.DrivingHome := true;
8 H1 T. D# B, d0 P+ C3 q. u/ c( j rgManager.tryToStartTransOrder;
- G! t: }7 w5 a9 I0 I if @.Destination = void
; h8 j) ]" p" D then -- no transport order for vehicle @
# e! V/ f: o, D. ?1 @ @.Destination :=" X, Y9 \0 r; Y" a% r! B$ I$ t
rgManager.nearestFreeStation(@,track.~);. z0 a% p! }% W& C
newDirection(@);
( |( X! @+ B( f& F, M9 f( g" \ if @.Destination /= void then
6 r3 N, w: T$ h# z3 e @.Destination.NumReservation :=5 \1 {$ q7 R3 f H/ C
@.Destination.NumReservation + 1;9 ]2 O4 o K6 ]) G6 W
end;
* U6 d% Y7 l7 h" F @.CurrIcon := "drivingHome";
* L9 L5 A1 B- x% X @.DrivingHome := true;1 t, `. X* B/ l8 Z
end;
/ L" Q' h( q' x. H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 L/ w# R+ M. p; D7 l part := @.transpOrder;( y6 J5 ^/ D/ ~/ `5 X% C/ R3 Q/ f
part.move(@);-- load part4 g4 t, {" |" L6 H* ?5 _5 w& [
@.CurrIcon := "load";
: N! ^7 _' Q$ u- c+ [' W, J GlobalDistObj := part.globDestination; J# d+ N0 f. B; \
assignLObj := rgmanager.rgAssignL;
) y' ~8 @! I2 e2 [6 A/ B8 {0 V row := assignLObj.getRowNo(GlobalDistObj);
) ]; R1 G1 w4 U4 T( y3 A if Row = -1 then -- since 70
5 o) {6 a- q( R4 S3 _3 `9 r if lan=1 then
3 E8 z" J' \/ V" V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 S+ ]/ b% E* {. F! T: ~1 P% W7 H to_str("in der Andockstation: \"",?.~.name,"\""));
|2 p1 m" ^, S8 F$ {- E else
* f- }5 j. u$ r. Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ W [( ?4 c+ x1 Q7 M* e! N to_str("in docking station: \"",?.~.name,"\""));
) z* U. [2 N$ J6 s7 z+ y; l; K end;! k& C- s( u7 ~9 L3 e
else
9 T/ X2 W8 P4 O$ g+ F5 I! @1 ? @.Destination := assignLObj[1,row];
' I$ n4 Y" L& U" E: P& Z s6 j1 J end;
# |: b) x5 H+ E* l; t: `) y newDirection(@);
# T" b6 y' j& q" B3 F( i( P) k$ m @.HasOrder := true;4 V2 I J8 a& l7 p
end;1 m N1 ^ N, M" x/ V
end;
# t7 t; j2 b3 X+ o) \2 c1 e1 F/ jend; -- of the method1 z9 M, e* o% l
|