/* called by: entrance ctrl of the object 'track'+ j4 _5 G8 s& U8 t5 h0 g7 J
*/
6 ?- j9 V5 F1 _) k* h4 Z5 | J) s! ^+ j Vis
/ @ W6 P2 @8 @* s8 j* [& r part, GlobalDistObj, assignLObj:object;row,Lan:integer;( i" M+ z, D3 N1 p! @; |& V
do
3 f% {- L2 F9 u& P Lan := rootfolder.Internal.Tools.AOLlanguage;
# O! X' Q8 x/ r3 g9 Q" P if current = @.Destination -- else return
- Z8 B& s0 b6 R then
2 M4 `% Y+ e0 ]1 `, w @.Destination := void;
, {. x$ ^9 w; p# ^ if @.occupied then
2 }2 ]1 e/ L) a* P K part := @.cont;) J2 Q, x0 D, j! M
@.transpOrder := void;5 ]1 n+ q \4 S1 B9 l' n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( d5 y: q. @5 R8 y @,root.eventcontroller.simTime);) f* {0 I3 w+ q* r j
@.HasOrder := false;
* O s. j8 }3 L: G @.DrivingHome := true;) e3 N6 B* E# W
rgManager.tryToStartTransOrder;! v5 I, u3 s) Z6 V# Z7 A e- k' {
if @.Destination = void
5 B" C: l8 e+ @9 O/ K. | then -- no transport order for vehicle @0 b/ O6 ?4 O2 Q/ ~( t0 V* S
@.Destination :=/ Q/ v% b7 \4 ]
rgManager.nearestFreeStation(@,track.~);4 W$ Q- o9 A- L D b" y7 r' s0 B8 W
newDirection(@);
' L& T) W" Q7 i% ] ~) J if @.Destination /= void then
! ]/ {9 L% J) o3 Q* A/ i @.Destination.NumReservation :=9 d) T" Y3 P0 B8 b9 g3 M6 w$ e
@.Destination.NumReservation + 1;4 f7 }0 a! r+ ^0 R3 U$ c
end;
% k) u0 v- K: t' h N @.CurrIcon := "drivingHome";
. C$ K5 \, K' B2 S& h% g+ P$ p @.DrivingHome := true;! X( F! m3 |( M8 N, H, x! Q7 P
end;
5 {( U) R% N: ~: ?: h3 V8 u5 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 _1 a. t& y- p* L part := @.transpOrder;- X- c4 @6 Z" @4 q: o2 {: U
part.move(@);-- load part. Z. F. n1 b }4 H5 ?
@.CurrIcon := "load";& S8 s+ M' d5 A1 c3 f3 V: y
GlobalDistObj := part.globDestination;
* R2 x8 T( y+ s7 I# t3 c; T, O9 b1 F assignLObj := rgmanager.rgAssignL;7 f" f% @/ O) z: x+ y
row := assignLObj.getRowNo(GlobalDistObj);
( M) w- Q2 o" Y( J) w7 w- d if Row = -1 then -- since 70/ F8 i/ v( T: ]* `0 H
if lan=1 then
3 C+ _9 }5 X" {- W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) r$ Y% H/ e. o/ y to_str("in der Andockstation: \"",?.~.name,"\""));- s; s" j4 f, C1 Z5 V! U
else
" _0 d# x4 @, h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 V+ x: j" L# {! q, W7 A1 j! ]
to_str("in docking station: \"",?.~.name,"\"")); ; a! r9 M( b* [' K; P7 E
end;
* s. R. Z0 S1 A; R3 |- z9 X else
4 N! E& [7 ?9 t/ ?7 K, \ @.Destination := assignLObj[1,row];1 C4 b6 j) C3 U( X* e t
end;
Z/ v1 D6 V7 M/ Y6 o' D) } newDirection(@);
& r0 ?, ?/ b( k- X$ y; x9 a @.HasOrder := true;$ T/ H1 J5 O) G6 K1 Y3 w
end;6 _" D" v" \ R- s& t( `6 ]
end;
+ w* ~6 L0 J c* e8 S/ nend; -- of the method
7 L% H% i: n$ p$ o0 M( K |