/* called by: entrance ctrl of the object 'track'
% I0 A3 ^: K( l# D/ c6 P; S*/$ W% M$ G. y. S7 g' ?" }% [1 {. z) W: B
is n6 |* L/ K0 h P' m6 M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 l2 [% ^) ?+ g$ h# i& X3 X3 i" g
do+ r: }2 b' E; Y" O) }' S7 B; n+ y
Lan := rootfolder.Internal.Tools.AOLlanguage;6 z" U0 F0 v+ @& i3 J+ b- r
if current = @.Destination -- else return
& Z% q" K9 n; o6 p' q L then
5 n! i4 Z/ I$ l5 t7 U$ S- k5 i @.Destination := void;
6 j- z1 y! o/ r, | x. g if @.occupied then/ T2 ?2 R3 V; g p
part := @.cont;
2 @. e4 ^: B) O! a) N. m: b, r @.transpOrder := void;, L; E1 @9 H+ [! t. O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& r& V9 S0 h% G8 l; S. I @,root.eventcontroller.simTime);
; r- y1 o* \5 |9 o4 L @.HasOrder := false;( l& W1 R& \. E4 U- ~8 f$ l
@.DrivingHome := true;
- @8 n0 U3 H) D8 ~ rgManager.tryToStartTransOrder;
* {7 }; u7 J- b0 M4 v if @.Destination = void' j; n! U" j* E ]
then -- no transport order for vehicle @
5 m o6 H* N. L- ]6 @) k9 a8 f: b5 i& k @.Destination :=
3 O' l7 [1 U) n6 O" Z9 D rgManager.nearestFreeStation(@,track.~);' A, l4 Q# m; o: e% \* i
newDirection(@); , @1 o8 [7 w, X& A
if @.Destination /= void then3 v5 d& F( n6 i% w) H
@.Destination.NumReservation :=$ j7 r" Q7 {8 [5 n, L) c" j2 v
@.Destination.NumReservation + 1;
/ ?- r1 p& h; g1 r: M* u8 x. ] end;" r7 k! J" t: C) `, J( C
@.CurrIcon := "drivingHome";
& x" w3 e+ c& Z/ W" R @.DrivingHome := true;6 k+ ~% ~& s$ [2 y' Z2 O8 d, e
end;
0 d4 i" P7 S3 u0 G& M& u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 }* } N( q- v/ @/ R1 s; u f part := @.transpOrder;/ x' L" ]/ d, Y6 a0 z# ?/ y3 _- W
part.move(@);-- load part2 Q! \, ]: s7 F. |) V5 N
@.CurrIcon := "load";
5 K. H3 M: p; u8 o) b GlobalDistObj := part.globDestination;
' r/ s Z* m, D6 l2 V s2 ^ assignLObj := rgmanager.rgAssignL;+ n; ?; Z! W m
row := assignLObj.getRowNo(GlobalDistObj);3 D" _7 ]$ k) A R4 B7 B
if Row = -1 then -- since 70- J) y7 @$ ^+ o t% P( Y
if lan=1 then" z! D; q) i7 {0 ]+ i* i# K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 a& s/ ?+ `9 y/ ]$ c to_str("in der Andockstation: \"",?.~.name,"\""));# \" ?1 X- K3 t4 y* a; ?: ] K
else: U, D) k8 F$ H; a" d0 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( @& q. _1 B. d
to_str("in docking station: \"",?.~.name,"\"")); 1 |0 V0 u4 f8 z" o1 K1 b1 G3 C2 f
end;
+ p9 E3 I7 E$ T! F$ b else
4 m8 p7 {6 [/ C. F& t4 K! _# ]3 y @.Destination := assignLObj[1,row];1 R. \; Y$ ]7 g3 @
end;
[: E7 N9 L4 W) x( ^0 \ newDirection(@);
# _) r8 `+ H) x+ @6 E5 h8 Z3 c1 p$ k @.HasOrder := true;
* q- W- |% w9 J0 f& Q! J/ L+ H5 o) @, O* g end;& T1 j% }( _" F; C4 A
end;, k4 l" g- e; l$ z
end; -- of the method
8 @" D4 J6 h& T5 \5 G! { |