/* called by: entrance ctrl of the object 'track'" w. H/ l3 P z* ]4 u* H7 r
*/0 }, [* I% Y$ P* O: c M! m
is: C' v7 D6 h& O8 ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- O4 L0 I( {3 d- \/ H. u
do: F! s- N) v3 M3 H
Lan := rootfolder.Internal.Tools.AOLlanguage;5 Q3 H+ d/ Y! V: }- T5 M3 t( j
if current = @.Destination -- else return, x$ K# G0 `+ U' {
then
' V) S$ p e" n s \ @.Destination := void;
5 P! k6 h( @7 |( Z if @.occupied then# V+ b3 P" @* A! Z7 r
part := @.cont;
7 Y% j. U$ O) V @.transpOrder := void;
' _6 |1 h0 d. q6 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 h$ Q! \& l' M* U) @) p
@,root.eventcontroller.simTime);/ b P; f7 z$ R- d: j6 N
@.HasOrder := false;
\2 K- Y' J% m/ R% T4 t5 k @.DrivingHome := true;
, @: E! A& Z/ p5 y' L- | rgManager.tryToStartTransOrder;
" s2 }- Z9 Q/ t% T+ X if @.Destination = void: g8 T0 s! I' ~8 j, p: \" |6 M
then -- no transport order for vehicle @
' W& D; O1 I0 t3 ^ @.Destination :=
. f+ ~! `+ D7 z1 Y2 ?# T) z# A& K rgManager.nearestFreeStation(@,track.~);
. k+ `: ~7 c& ` newDirection(@);
$ V( P3 I* ]4 Y; d if @.Destination /= void then; R9 p# R, X$ f5 N b" z2 C3 G
@.Destination.NumReservation :=
+ Z8 l5 l7 @$ z7 r @.Destination.NumReservation + 1;3 X* D# f& r6 ]6 s* b
end;
' F: t) x1 [% k2 d+ Y' p* D) ] @.CurrIcon := "drivingHome";1 ^- ?& b7 q+ ^% S
@.DrivingHome := true;) Q6 M3 L0 h$ U2 m$ C
end;/ I) e9 i7 J/ o$ c: T1 o+ K! z8 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 A* |* e5 p% }8 E. C" O { part := @.transpOrder;9 a# ^( e5 Q9 L7 K/ e
part.move(@);-- load part5 Q6 T* R' t' {
@.CurrIcon := "load";) V' X5 j7 ^% g6 X0 p: Y( E7 l4 Y
GlobalDistObj := part.globDestination;
: c0 P% b: ?1 j assignLObj := rgmanager.rgAssignL;
0 M% z& k7 k2 p# t6 K$ d. R row := assignLObj.getRowNo(GlobalDistObj);
" ?0 k3 t$ ]. H, ]; b if Row = -1 then -- since 70, L. ]" a% N" Z, j( T' Z0 [
if lan=1 then4 p7 ?8 M5 Z* X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ v+ ]$ Z- g/ h- ]( X) u& R5 _
to_str("in der Andockstation: \"",?.~.name,"\""));4 n, v# a! M3 f) C4 C
else4 Z$ B! Q0 M# {, ~4 y) ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 M' f9 i; U/ B$ B$ a
to_str("in docking station: \"",?.~.name,"\"")); 0 M# j4 U w' d7 }) y. f
end;. d) ~4 S6 _8 f& s! F/ x2 L" C. B
else
6 }' R, S& ~( d% G( Z1 b& ] @.Destination := assignLObj[1,row];
/ y6 f$ b1 @' N) g0 A, r' b* ^ end;
/ o+ c# u$ B5 r7 d newDirection(@);% j. _, @! S/ r
@.HasOrder := true;
+ t2 x ~8 r z$ Z- s end;' K4 J' f; R, N% V' Z; u
end;* ~' g9 W. W' h7 v" j2 q
end; -- of the method9 T& C _9 v9 R% M K4 b
|