/* called by: entrance ctrl of the object 'track'% V- e% @/ I) O2 t- N0 p
*/
6 M/ Q# Z* {: Q& ]* Qis
& k! H1 k, t+ |1 n; Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! l& K& y( \6 ?/ j0 vdo! S2 \+ A$ k& ?3 \6 N8 }* n
Lan := rootfolder.Internal.Tools.AOLlanguage;* x% f% _' i* j& R/ ~8 W
if current = @.Destination -- else return
: B: A3 B' _4 g9 \ then
6 r; w1 K: t; g; o+ P; l; o$ \& M @.Destination := void;
# A1 v' h0 O) }2 }7 T5 j: s if @.occupied then8 c1 W/ Y% k. l1 b' |! z
part := @.cont;
0 q" Q. |" P0 E; T/ t5 k! m @.transpOrder := void;" V: ]7 j6 \, F) x4 l% M* \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ U% M( X& K, _# T: [/ Y @,root.eventcontroller.simTime);% k/ q4 b; j$ m% W
@.HasOrder := false;, m+ [6 Y: Y% X" u# Q5 J* `
@.DrivingHome := true;
0 @2 _- `. \3 s0 M rgManager.tryToStartTransOrder;' e* A a- r; x) c2 K5 B; B0 H
if @.Destination = void% @0 ^* t, y$ O6 Q( I* I( {
then -- no transport order for vehicle @8 W( E! Y, [! o* w }
@.Destination :=
e$ O# E7 Y( K$ K. k rgManager.nearestFreeStation(@,track.~);
# Z4 o" U& I" \" J. |4 \ newDirection(@);
. q1 y: C4 |' T+ R( h0 ^9 T- E if @.Destination /= void then
( E; d4 ^' h$ l4 F% H @.Destination.NumReservation :=+ C B8 R$ T' u7 c* f$ G
@.Destination.NumReservation + 1;* e" \3 X: |- x0 X4 ]" D
end;
8 P+ ^( q( {) G, V4 P @.CurrIcon := "drivingHome";
3 B3 Z3 S1 n# x2 H. O$ ? @.DrivingHome := true;
, c C; _9 A$ M+ Z1 X, t3 J% Q4 u$ k end;! w1 a. W. c0 t) d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ s/ Z X* \& t" b7 N
part := @.transpOrder;9 |7 j; O7 t8 {$ L+ }+ k
part.move(@);-- load part
1 ~3 \/ `8 }& `" Y @.CurrIcon := "load";+ X8 k5 ~" K! x5 N
GlobalDistObj := part.globDestination;1 r8 E( D$ v @* F9 _6 j' `2 q
assignLObj := rgmanager.rgAssignL;
" _# c8 O" Z8 ~1 V row := assignLObj.getRowNo(GlobalDistObj);
! r) Q! x& K# b( B& S5 i if Row = -1 then -- since 70
O4 C6 F7 ?" r* L if lan=1 then6 V" _* e- a- ~; h4 y% |1 ~. j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 t( \7 {; a" l; c$ h } X- r to_str("in der Andockstation: \"",?.~.name,"\""));
+ s e5 j2 H9 m1 `- ^ else
, k1 Q) |+ d7 R9 ~& i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 E* q- n0 N. \9 Y: {1 w to_str("in docking station: \"",?.~.name,"\"")); ! |- Y( l+ T0 I
end;& B+ w5 F; X* f+ `/ \7 Z" u
else
1 P$ d2 H& e! G! A& w @.Destination := assignLObj[1,row];: o% G: f1 g/ n/ _. _! \8 }0 o
end;
0 I0 e9 N8 A5 { newDirection(@);) f. a, d" E/ ~+ c) \$ l; m
@.HasOrder := true;
$ ?/ v) W/ ^ ?1 P4 Q end;0 S! O& _2 ^% P6 e E, ^
end;' [+ i9 e. e4 c4 F) w5 d4 |
end; -- of the method
& Z$ T+ H! s6 V) H- b1 d0 d |