/* called by: entrance ctrl of the object 'track'
, E/ o! [2 {4 V; F: s& w+ N: B*/6 M4 d. H" w" N1 Y2 Q0 ?6 `
is
) Z/ T3 }% V# ]0 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: E9 L5 ?, ]: Z( Rdo
% S1 C! \) K, z/ \$ U Lan := rootfolder.Internal.Tools.AOLlanguage;
2 l5 z6 \# ?, V' h- g: p if current = @.Destination -- else return, n9 c- u$ z2 |, r0 [
then
3 A& S$ |# b& g4 Z i& B6 ` @.Destination := void;
; c( `# x1 s+ x0 B# m' M if @.occupied then
2 {( s: X1 t! b3 E: i1 E1 o1 ?4 y* x part := @.cont;% f5 |/ n4 I8 ^, S* u
@.transpOrder := void;" C8 o. \, u6 U% b) n2 q' L/ a3 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; G! B& d+ O( u2 s0 A m) F @,root.eventcontroller.simTime);3 r% A% u* l4 Z C6 s( b
@.HasOrder := false;
" I. a" ~$ V' k9 v+ p @.DrivingHome := true;
E0 K) l+ @# ^% F1 J rgManager.tryToStartTransOrder;: G, P) y* M& A# Y Y3 q" f) [
if @.Destination = void' C2 U( u4 S8 r
then -- no transport order for vehicle @
- ?$ o: Q. u. G- G# d" k: q @.Destination :=
7 z3 ^0 e* j/ y8 b4 m# w/ x$ X rgManager.nearestFreeStation(@,track.~);
9 m4 Q+ }& \8 x j newDirection(@); 4 q) _" ^8 _+ X" d0 a# I
if @.Destination /= void then
1 v. M6 j" |0 \: B @.Destination.NumReservation :=
( ^; _' ?" \0 G5 c% p @.Destination.NumReservation + 1;) Q+ V; M% k0 f. X' M! _
end;" a3 P# L' s. b6 p5 C4 Y6 z
@.CurrIcon := "drivingHome";
& N# ^/ I6 d. Q Y @.DrivingHome := true;
* o3 u" y- [+ X0 e end;" Z6 k0 U- o* q$ b/ i* W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 X% P6 `$ o8 v1 c3 h# R
part := @.transpOrder;
+ @- R" {* P/ ]+ Z0 }8 e- j* l* Y part.move(@);-- load part7 T1 d; b/ l6 t/ e
@.CurrIcon := "load";
7 G' p- E5 W: M* ] GlobalDistObj := part.globDestination;
4 r% _. D/ e) H% `8 T* w assignLObj := rgmanager.rgAssignL;6 k5 j+ m, C. {% z( U2 s
row := assignLObj.getRowNo(GlobalDistObj);
3 E" a, K, a6 c) A5 Z6 y8 E if Row = -1 then -- since 70* q- V& f$ g- Q- ?! f- A
if lan=1 then% B# ~/ Y3 P; S9 m5 n3 j& ^ Q, }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, d5 b1 V: V: o0 ] to_str("in der Andockstation: \"",?.~.name,"\""));
0 {: G8 U& @2 W8 d else6 [7 s' R1 b; y4 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 j4 \, G. a( |& l/ x/ r to_str("in docking station: \"",?.~.name,"\""));
6 r/ B0 \! P; c# P# C end;
l4 D* K0 g$ K else
3 b; L9 o2 g+ q; n6 u- q @.Destination := assignLObj[1,row];4 b4 B9 [% ~/ O+ S5 R
end;
& S! d' C @3 h7 V7 M newDirection(@);6 o" `; u, H/ s: M1 Z8 y( }" k
@.HasOrder := true;
* T" H, X# D/ v3 e6 p6 r: M end;! L! a8 B. A. M( P2 s, F, w4 M
end;
/ C6 u& H% \: v, b- l) n* Fend; -- of the method1 @( E9 j4 t- j. z2 Z6 Q! L& I
|