/* called by: entrance ctrl of the object 'track'
; S% W1 Y& d/ D3 j0 [*/2 t: \. n( [) w5 f+ P
is
2 j$ r9 I( a- e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 M9 R! Z* b: rdo2 u5 w u& l% c3 S3 j
Lan := rootfolder.Internal.Tools.AOLlanguage;
; \* K7 {9 D1 i+ M if current = @.Destination -- else return4 C1 x" Z$ Z4 c" c
then
1 W1 V3 o) ~; U, E5 y4 |) C5 J: s5 o8 _ @.Destination := void;& R2 n. ~$ ?, j! @( C1 q
if @.occupied then
' I0 f& A- `3 A$ c/ g& _ part := @.cont;
. U, a) O( g# J m) F' _8 n( v. { @.transpOrder := void;5 i$ m! i* M W# w0 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- D) Z, N! j( g/ M* p
@,root.eventcontroller.simTime);
2 L* d! {. ?4 x, |8 T- C$ x @.HasOrder := false;
% S' [0 a8 E) b) T; f- U! F4 D @.DrivingHome := true;# v! _3 W7 J3 B
rgManager.tryToStartTransOrder;
$ p$ C9 L" v: j# S+ \# o if @.Destination = void
/ u/ x* g5 n5 J, N9 ~( o then -- no transport order for vehicle @
+ @$ U/ r' [+ Z' b7 Y4 H( k7 y @.Destination :=- e; }) A' C8 f' L
rgManager.nearestFreeStation(@,track.~);5 O7 T8 Z' X- [, x. N
newDirection(@);
4 J5 s; p2 S/ [0 y8 G' ? if @.Destination /= void then7 e* k0 m$ h& c! `7 r" e1 c
@.Destination.NumReservation :=: N9 {- G' p, S& @& o- |, |8 E- |
@.Destination.NumReservation + 1;
" X3 e L+ S1 k' ~$ O end;8 U" P1 A5 ~; W/ r& l, W, y
@.CurrIcon := "drivingHome";
- V0 y9 W: D$ }* b, m+ ]( J @.DrivingHome := true;' O w) T" d" f- e
end;
' G) R1 K$ \, b( k# g2 U+ X( [' u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 E6 `, k/ b4 `5 e" t! k part := @.transpOrder;
% B4 ? H. K8 k; M part.move(@);-- load part
0 {; l7 G9 ~. l; ] i @.CurrIcon := "load";
) e( c+ c) z0 W( h GlobalDistObj := part.globDestination;( g3 R0 q, \) y& T/ u* {
assignLObj := rgmanager.rgAssignL;: N+ D b# ~5 f* v( D( j* Q
row := assignLObj.getRowNo(GlobalDistObj);
2 l, D7 y9 F/ G' q if Row = -1 then -- since 70- _2 V6 G% y8 h" B; a9 H p
if lan=1 then
. `9 b) m/ a; e( b. Y0 V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& U" A3 T& c5 c6 [" e& n
to_str("in der Andockstation: \"",?.~.name,"\""));
" y- d7 z& j0 b& J. C0 n else
7 _3 O- e% S) ]% m+ }, J1 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: x! b8 L! E* B6 [6 K
to_str("in docking station: \"",?.~.name,"\"")); + x+ \% @* q# X' l- T q, H. ~7 f
end;. G4 o" X3 ~) }6 [
else% s \4 J! n! V* Y
@.Destination := assignLObj[1,row];# T! o) W) h' j
end;
$ J3 V1 l$ n+ ` newDirection(@);, p# H/ \/ m" _& c
@.HasOrder := true;
+ U, |) t+ `' \9 _5 o* P end;# ~1 E! L! ~; l. O
end;/ k# x1 B- ~+ G
end; -- of the method
8 o% ~5 c$ x7 b% _% } |