/* called by: entrance ctrl of the object 'track'
8 d6 b& f, R/ M+ V+ P7 S5 _*/, X+ J) x& U, ^& c5 j4 u( u
is
! K9 G: Y2 g5 u9 Y& C" Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 s- d, [8 f9 C$ udo% K; |5 D, K# ^. f
Lan := rootfolder.Internal.Tools.AOLlanguage;
# K: s5 r! S" i$ {" H if current = @.Destination -- else return: y8 j4 ?4 P) G- Q" r& p; z7 J$ ?
then# h. L0 x3 |. K) s. v
@.Destination := void;
$ `& K6 h! x" h% X4 o& x if @.occupied then
* l; E6 J% }( Z/ _" P# d% d part := @.cont;" O; X8 B: K! |, [4 T1 F) i
@.transpOrder := void;
- N6 M7 R' w+ M7 x' P1 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; z; T) P# q) X; S* S }
@,root.eventcontroller.simTime);' C8 f: A, g& k
@.HasOrder := false;! g# Q8 _. f9 d0 G: x m5 C; d
@.DrivingHome := true;
5 g( I; ?8 K: M rgManager.tryToStartTransOrder;! P) S. Q c: z+ n3 \, b0 g
if @.Destination = void$ M& {& ^ d& z& w/ o
then -- no transport order for vehicle @
9 v$ I0 c5 w7 U9 C" l @.Destination :=
, O& R% S" Z5 E7 H. P9 V1 _. M rgManager.nearestFreeStation(@,track.~);
: M# M8 J4 F b/ q/ z newDirection(@);
4 C- c9 c# E) E+ |) M if @.Destination /= void then! t7 @) R2 y3 e2 ^1 L* r! T
@.Destination.NumReservation :=7 m. U: L9 V1 u' F Q
@.Destination.NumReservation + 1;
: q# ]* C9 n; g0 J9 V# V end;- T1 Z, b' ?2 {* n. h" B# V9 P
@.CurrIcon := "drivingHome";/ P$ R% D7 i* v$ X; i3 W
@.DrivingHome := true;+ q& f( x% Y1 ~1 n
end;
4 z; J4 R, z! G/ U- a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; {* P Q9 P- S5 d0 k! D& N! p" ] part := @.transpOrder;3 ]+ ?$ l9 u% z/ z* V
part.move(@);-- load part
: D, D% c. c9 X6 n8 X+ e* Q @.CurrIcon := "load";
7 U8 O6 V* ^4 }+ @: g# o( J GlobalDistObj := part.globDestination;1 m' y: t& y1 F( V# k* w
assignLObj := rgmanager.rgAssignL;
5 P/ p2 k4 ~. c row := assignLObj.getRowNo(GlobalDistObj);5 _+ H N( n3 P! p# P0 l1 s) W+ \
if Row = -1 then -- since 70/ Y( R B9 z. S
if lan=1 then6 Y* W5 W# }6 Q6 G& Y1 s% a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% w" ?4 G( T& g" D- t
to_str("in der Andockstation: \"",?.~.name,"\""));1 Z0 E7 @; x4 C( v7 t
else
/ E5 O( P0 \: w: M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' S. t4 Q9 L" Q7 a to_str("in docking station: \"",?.~.name,"\"")); ( S& D* m' J% c7 z
end;
2 A# |0 t& f# ]4 U! D4 X- G else" M2 j, o/ w* H! y9 W! M6 e4 B
@.Destination := assignLObj[1,row];
, o! R8 p3 ?1 c) D& s! v. E! x6 J end; 0 G) E' U3 G7 X; J1 D7 C& h
newDirection(@);
& ?' l# F. d: n/ m' d' k$ N6 _" E @.HasOrder := true;' @6 O% \1 Z) ?) U
end;
( d% X( v4 ~( N" Z end;! a4 J) V( ?7 g$ T' t v; c
end; -- of the method0 i- b4 ]( x8 W, G/ S5 Z
|