/* called by: entrance ctrl of the object 'track'% O9 ~+ t3 Z. [5 b7 ?
*/
4 i" e5 @- q: R x+ his# k+ ^( G( p3 X$ u8 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ~0 D+ A% i$ M; Y. _( g4 r
do
5 s% K9 C1 W* }5 \! _& c; |. Y% ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
8 z& G& |! i H if current = @.Destination -- else return
! I7 H' W) c! v2 t then
9 o/ h& L/ @4 v* E4 Y) l3 V6 K8 R @.Destination := void;
; S# E5 U" w/ ~5 {2 a if @.occupied then
; t' C4 s2 T% t/ H part := @.cont;4 P! K6 B7 o9 ^1 s. ^2 C: ?+ h
@.transpOrder := void;
) y" N0 V; Y5 q: R3 b. m2 n7 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 ]& ~# C- `& M& P" z @,root.eventcontroller.simTime);7 m9 ]5 A3 Y e4 e" Z
@.HasOrder := false;( ~# n* @, Y) ~8 A: H# {: {( B b
@.DrivingHome := true;
! T7 t5 Q9 E6 i rgManager.tryToStartTransOrder;
! q+ u _0 R8 j0 M8 @ if @.Destination = void1 r3 g1 l7 A& U+ U" |% n
then -- no transport order for vehicle @
# P; u- c. M( B2 J" e @.Destination :=$ t# a. a8 ~4 J" D1 G+ q/ s
rgManager.nearestFreeStation(@,track.~);
. `2 D$ M' c, G$ r/ w newDirection(@);
/ T! Z) @ q0 x if @.Destination /= void then" j# A# e6 w8 M+ J- I
@.Destination.NumReservation :=
- q: `" X' \. c( j1 N: }4 }8 r @.Destination.NumReservation + 1;
( v6 x, S$ H$ ?5 y5 r6 W5 w( @ end; Y3 }) a5 U6 z% o( n
@.CurrIcon := "drivingHome";& T2 p; `% L# `9 t( I8 ] Y9 D2 T
@.DrivingHome := true;0 r* B0 ~8 r: Y- ~4 O% |6 B2 f5 j
end;
& H( k: T5 _/ z6 s' P& y1 u. Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station& w: h" u3 N" O! }# Q2 q
part := @.transpOrder;
9 L# d e: [8 N* [ part.move(@);-- load part
* R8 \! w5 T5 { P. b @.CurrIcon := "load";7 |) A: |/ B$ {- V
GlobalDistObj := part.globDestination;
8 Q) L$ J3 X: K9 P( \/ V/ m0 P assignLObj := rgmanager.rgAssignL;
& r7 l# ? _& N) N! o row := assignLObj.getRowNo(GlobalDistObj);5 ]1 n/ x! O& _8 g# v
if Row = -1 then -- since 70
+ d$ d3 l3 F9 h9 @* y; V if lan=1 then
* s/ T' i3 @4 V( B7 t( z# e' t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& C5 f) Q9 X# i& E to_str("in der Andockstation: \"",?.~.name,"\""));
- b+ z& [" P3 S" M R i else6 N1 K0 x. n m! }6 x9 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% ?) B( X, H! }: m! G/ @
to_str("in docking station: \"",?.~.name,"\"")); 4 _- `3 U$ c3 M- m
end;
: V7 C" t# d4 a' E% S3 Z( E else& }. K8 T: ?, y' F% m$ u
@.Destination := assignLObj[1,row];) ~ g, B! N( j
end;
# N) t0 ~7 K' ~$ s: \ newDirection(@);% y, y, P# J7 V f, x7 j
@.HasOrder := true;9 p; z- H# ~0 N6 \ N; o
end;
, J9 C" z& g- {# ~6 G% j* W end;
5 ^% l2 |" F4 @5 ?4 C2 k0 K L0 Rend; -- of the method( S' s* @4 m. S: l2 b9 _
|