/* called by: entrance ctrl of the object 'track'
' ~8 O- A: c& r& B+ f- R*/
+ i8 ?& {" B+ \/ Zis
$ \+ _+ f p% z; a2 W% S" l1 ~+ N part, GlobalDistObj, assignLObj:object;row,Lan:integer;; O0 Z$ x0 g0 B3 X4 E
do
4 S6 h$ S( R) e: r& Q/ m Lan := rootfolder.Internal.Tools.AOLlanguage;
% i. X+ o z V. I+ q. _+ X' n2 Z if current = @.Destination -- else return
( o* V" ?2 P7 ]' S* O7 f then) p& M6 u+ s' D7 \- Z
@.Destination := void;/ z9 m& Z3 }4 ] B
if @.occupied then% p6 |" m1 j* k
part := @.cont;
' k7 M- D8 N N, v @.transpOrder := void;
. ~. h- b; o5 M* E/ W( [' K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 R9 O, ^" e1 d4 p9 T" k/ r
@,root.eventcontroller.simTime);# O/ e$ ` H* I/ @ j
@.HasOrder := false;
+ q. t8 t2 y: u) c @.DrivingHome := true;2 F0 o! M% S1 P ^/ I' [
rgManager.tryToStartTransOrder;
9 o# M9 t! V! [ if @.Destination = void
k$ o$ W$ g) \" Y then -- no transport order for vehicle @
8 T) p E! G0 T$ g+ T6 w @.Destination :=
r5 A( W; f* P0 d& x: ^) [ rgManager.nearestFreeStation(@,track.~);
& y4 J' T3 w7 J4 m2 d3 J newDirection(@);
, c* Y# v" c" o+ w3 e* q2 Y9 |7 Y if @.Destination /= void then" o' {9 ?8 R2 s* a) X
@.Destination.NumReservation :=+ m3 j5 d6 [; W, W) J
@.Destination.NumReservation + 1;2 X! x. t$ p/ R: X2 U% Z W; ^& X
end;. G3 a( U! E+ g2 A1 X
@.CurrIcon := "drivingHome";
5 W" T, V) D: @7 Y! w. @ @.DrivingHome := true;
0 Q' S1 e4 a% P! n; i5 W" {: N! | end;
6 f9 _9 S& t1 d( P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 y+ S8 d$ p; Q8 p- r! U5 ?; x1 N part := @.transpOrder;8 Y. E+ j, k5 `6 s
part.move(@);-- load part
3 ` R& G, g0 [/ i, i! l+ m: ~# C @.CurrIcon := "load";
8 r7 x# i9 ?' h) e GlobalDistObj := part.globDestination;4 H5 n- W) I( g+ s( o, s. ?
assignLObj := rgmanager.rgAssignL;
0 K6 S2 l- N, {. s row := assignLObj.getRowNo(GlobalDistObj);. g! K, r5 E& Z3 l Q% u
if Row = -1 then -- since 70
+ D" L4 E! V9 x5 |) R8 b; o5 [3 T if lan=1 then' S. z' ]$ w* x, Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, V( Y/ h+ z+ Y6 Z! J) B6 n to_str("in der Andockstation: \"",?.~.name,"\""));
5 P7 A. E! `& A; q2 G else
& `) q$ g0 o6 T. h# M- i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 N' w3 H6 i0 B5 c+ a( B0 x
to_str("in docking station: \"",?.~.name,"\"")); ! S) q9 s' r& \( b
end;
F6 w( J6 F6 t/ P" x5 p. } else
6 L) B* h0 j6 h! g1 l( N @.Destination := assignLObj[1,row];6 W5 o+ v6 y( \
end; ) ^9 q* j. u0 E- j* M
newDirection(@);$ ]& g0 I% M) L6 J3 o5 @! {$ s
@.HasOrder := true;
2 N0 t; l6 v3 t% c* \4 X: X end;
/ y% t- h. Z0 l1 q0 j' p- { O6 E end;! @! k7 X7 h& F! f/ c
end; -- of the method. X& ?3 d; P9 J4 A- A& C. ]0 d
|