/* called by: entrance ctrl of the object 'track'5 ~5 P; b( H6 b3 s l; W
*/) g9 u a( ^0 g+ C8 y- P
is
8 {1 i; n3 t( B/ U' O7 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' p ], y# b, _3 U& d7 x; F4 Ado
2 R' o' S1 {0 y$ p* P: P8 G Lan := rootfolder.Internal.Tools.AOLlanguage;
P6 A: U" O+ D if current = @.Destination -- else return7 [4 a- N- s6 K0 q: ^( M9 Y
then
$ q: j& f3 _' s! p8 o7 F& B @.Destination := void;2 ^7 [+ d6 H6 @' T. M
if @.occupied then
9 [: J. V, Y! P; [# F part := @.cont;3 }' M' d: i% ~; q
@.transpOrder := void;; ^! t4 e6 V. n6 v5 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
}, W0 c( `: @, x* ~! G4 D @,root.eventcontroller.simTime);. ~3 f# S5 D0 y0 [7 g
@.HasOrder := false;! T u7 o- d6 D; a( h* E- P6 H
@.DrivingHome := true;# g2 a- u j+ z9 ?, U V
rgManager.tryToStartTransOrder;7 L) h0 N( }2 k' _+ S
if @.Destination = void, }( H: N4 [+ w9 R2 Q
then -- no transport order for vehicle @
# E1 q5 z) O& t3 i5 U2 R @.Destination :=' R9 S7 S* U0 M0 H/ i
rgManager.nearestFreeStation(@,track.~);( r: X# @" `+ Q! x8 A) R
newDirection(@);
6 y- `: ^6 a7 c$ B, {4 i if @.Destination /= void then
+ F% g. o9 |7 ^9 \' X7 U @.Destination.NumReservation :=
4 r; \5 ]6 z u9 h( ^& R! e @.Destination.NumReservation + 1;( [7 q2 K% N8 z6 I' `
end;
% y( ]3 ]$ h2 Z1 e, t; | @.CurrIcon := "drivingHome";
5 c! j! z D# j n' V3 l @.DrivingHome := true;8 a+ `, p! [( w% Z( @7 d
end;' n% p( z6 W/ D( ?. K& U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' `+ a: ~- @8 L0 l4 O) o part := @.transpOrder;8 X5 @9 F' ]$ k) F$ i
part.move(@);-- load part+ F |, W. m4 i: N, {
@.CurrIcon := "load";
4 p$ t$ E8 a$ I0 V: S( u) e% {% Y GlobalDistObj := part.globDestination;: X; {# p; `& _! {* o
assignLObj := rgmanager.rgAssignL; S/ b' Z; B9 X. F! j; {* [
row := assignLObj.getRowNo(GlobalDistObj);
$ C) [ V# [3 o/ F! G f if Row = -1 then -- since 70
3 c. r$ S1 `" l5 Y2 ? if lan=1 then5 S2 q$ j6 t8 t3 o- n5 B5 f+ P* u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# i0 v5 v! C( a1 B4 j to_str("in der Andockstation: \"",?.~.name,"\""));
2 K2 H' y; J" `& k else
) W* v/ t/ C' s7 v9 M9 A; n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' g2 E& M( V( I/ H" J: }) G5 D to_str("in docking station: \"",?.~.name,"\""));
+ K9 Y& L/ {0 o# g end; K) F9 @# s9 @. D- l
else0 q- }# R* J h0 H
@.Destination := assignLObj[1,row];: V$ F8 k( d ^( o% d
end;
6 M9 [6 T4 d2 d2 @* v! S newDirection(@);# {* \; ?% C5 q7 ]4 ?
@.HasOrder := true;
" |7 |4 q3 R/ E& ] ^0 Z. ^( f$ J end;. |5 Y& C8 t- s+ N: b8 {- J* ~* @
end;
4 g" R) A* f( T* kend; -- of the method; E" N9 @# J, A" I4 ^" _
|