/* called by: entrance ctrl of the object 'track'7 X- Z$ N" k% B, \
*/
" [& i7 ]8 w# I3 E% Bis
8 _2 n" Z* G( R" z/ B T6 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;) a& Q n% e8 w# \2 \2 Q
do: V x3 D( f1 ?# R! j. q
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 U; I. w* `2 c if current = @.Destination -- else return" n+ l2 ^- N: c3 x1 T
then7 _* |% j5 T. C# {/ s7 q; _ g8 X
@.Destination := void;
4 ^2 E1 j5 p8 x0 \ if @.occupied then
7 [/ k$ U; s, v( q+ |, B part := @.cont;
7 ^" w4 d# ]2 I1 ~ @.transpOrder := void;
9 F p, G3 J8 O* |$ `8 K' ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 I% L! w; G" {! ~4 D @,root.eventcontroller.simTime);
/ a! G! B3 l- h- t @.HasOrder := false;
& K" X: c) P V1 E5 A' j; d* B @.DrivingHome := true;- g$ U, R# _8 ?
rgManager.tryToStartTransOrder;# o8 }- X6 _ v' r$ y2 r
if @.Destination = void) j- T% s8 y+ w9 L7 }; Z
then -- no transport order for vehicle @
! p- k5 I# p3 d8 H4 p1 M @.Destination :=
0 o- r: D9 ?9 a$ A1 A rgManager.nearestFreeStation(@,track.~);
: ~' ~/ q5 H. D9 B6 P1 ^. s" n newDirection(@); # ^8 e9 W* A( ~
if @.Destination /= void then
5 k! l; u! |5 W9 Z& ? @.Destination.NumReservation :=
" I1 k% Z1 a9 U$ L @.Destination.NumReservation + 1;
/ J- x& {8 _! n2 t, |1 z end;7 K8 K6 A% G% V; \) a( c6 Q8 c; }# s
@.CurrIcon := "drivingHome";& n, _+ A( s& ?' ^
@.DrivingHome := true;% c% ^9 P7 e' R# F6 p: q! U* S
end;% V3 w, ?3 R2 S" O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% S5 u# O$ O& i: F0 I
part := @.transpOrder;
% T5 n$ L# U1 t" d3 S) T part.move(@);-- load part6 d- T8 N1 D1 n1 a
@.CurrIcon := "load";- s/ r, H8 [# L1 u2 @
GlobalDistObj := part.globDestination;
" s: v2 v# J7 U8 }6 ^1 n assignLObj := rgmanager.rgAssignL;
" k" C! n0 |4 e( A! t: i row := assignLObj.getRowNo(GlobalDistObj);
9 f# q& A* |5 h/ V1 \ if Row = -1 then -- since 70' x9 C! r) o4 ]6 B; [( s
if lan=1 then S ] p6 b& k$ X6 E: a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- A C# f Q4 P1 U" W2 I
to_str("in der Andockstation: \"",?.~.name,"\""));
+ W4 z6 J1 ?- C' e( r0 _ E else r) k: U y: E; |( N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 B1 G% k8 Z) a to_str("in docking station: \"",?.~.name,"\"")); & B: ]6 n& w) h8 W; k
end;
6 h6 B$ F' Y. t$ b else
) N0 c1 P. J8 n, E3 n @.Destination := assignLObj[1,row];3 [ E2 C H- f- T7 x( n) E1 u! A
end;
% k L% u1 \* y# O! X" p$ Q$ F: A8 e, m newDirection(@);* Q$ |4 G2 I Y) C
@.HasOrder := true;. g+ {' G8 X$ E- G) D+ f1 L1 v+ W7 w
end;
- _& ` J2 X. s; @) F end;( F2 h& w+ J. \1 K
end; -- of the method- a3 B" y* |* j( ^$ h% Q/ ]
|