/* called by: entrance ctrl of the object 'track'
) ?; |& S, g+ k# M5 M- |*/+ k; B* b3 L' H( u4 x
is
/ z$ U1 c4 i$ H- ^7 E* O, a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 P2 P0 {# X; X! M S/ h ]0 d3 sdo: Y% z! G0 m9 X6 |. F' N( K
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 _9 V. [7 {$ O. v* z2 p3 }% V if current = @.Destination -- else return4 |) s$ e( \ L' P0 k, {
then
8 v+ Q+ P0 H" ?+ @9 {. d @.Destination := void;! k' O. {9 U: `, l% o U- U
if @.occupied then
) c% @2 ]0 y9 o- c' | part := @.cont;
$ z0 n7 F4 x+ U5 ^+ s' P9 p# W; P @.transpOrder := void;9 `8 u. R6 Y" w/ q: j2 M" L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) k9 x, g' f0 Q# a- Z8 z/ k @,root.eventcontroller.simTime);
9 O4 p& ]4 x+ L; b* `2 z @.HasOrder := false;
3 y q: C% V; Z8 S) }2 A @.DrivingHome := true;
- c3 ^1 a' P$ f8 j$ q: i( r8 o/ Y rgManager.tryToStartTransOrder;
5 P# a! |# T9 @* l3 o if @.Destination = void4 r+ N) i7 X4 a! Q. G
then -- no transport order for vehicle @3 R+ `' M/ y6 k" q
@.Destination :=/ `7 j, T1 O$ o/ P: `, c
rgManager.nearestFreeStation(@,track.~);
! T8 }4 E% b% ~8 b newDirection(@);
' i. L: s* Z$ k$ \2 Y if @.Destination /= void then
' f0 G# F/ G+ b2 ?& J @.Destination.NumReservation :=
" }2 \/ s3 L3 d6 f& s @.Destination.NumReservation + 1;7 C( H: W! K. g
end;* \1 e) e. c8 _* w/ n5 s
@.CurrIcon := "drivingHome";
1 P1 o$ _( E' |$ v9 K( ^6 C% ]5 N @.DrivingHome := true;0 R4 Q6 r2 z8 C+ E% v, h
end;2 y% s. u3 \ i0 e/ `* Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 V# C/ [# z& P9 F part := @.transpOrder;
4 V8 o x! T4 [4 Q% p: f part.move(@);-- load part4 V# z9 H! D" i& a( C
@.CurrIcon := "load";% V2 b/ E+ D: O0 [
GlobalDistObj := part.globDestination;
' J5 o( ] G6 _8 v' \ assignLObj := rgmanager.rgAssignL;6 @. d7 I5 J# G+ s; y1 B9 ]8 }3 A! h
row := assignLObj.getRowNo(GlobalDistObj);
! u1 o: r, k- q+ U if Row = -1 then -- since 70! w3 c+ x' q* [- j) A; q
if lan=1 then
$ I/ n; o& S" S' R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, I7 O% l, z4 T1 h to_str("in der Andockstation: \"",?.~.name,"\""));9 k0 r1 D, V0 y2 c) X4 M- a
else
: l; s4 T; H5 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ n4 t8 g6 E, r0 p9 x, S to_str("in docking station: \"",?.~.name,"\"")); % g# z9 P/ C' F% `, o
end;
; W7 b5 b# ^- \% _+ x4 n else
. h; D1 v7 i- i) o- } @.Destination := assignLObj[1,row];
0 Z1 o% Y7 H; u& d! k! A- t end; 5 [6 x* N7 y" B6 @$ W+ x
newDirection(@);
) e, S! x% h( r/ U3 w @.HasOrder := true;
3 u( j& Q) j$ W3 p9 L4 ^ end;+ L3 @! k; _+ E: O- c& M
end;
4 L% c" ?. L! B2 Z8 v; { Vend; -- of the method
+ H/ D: n- _* s! k4 V, Y |