/* called by: entrance ctrl of the object 'track' @* Q ]5 B( @9 W; z* P+ L6 c0 G# L# {! J
*/
, @" `6 ]* r2 k) T" {is
' o- a! T, U" n3 \, H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: S% L% Y; j" T! ]0 K* w% Ydo
5 T& E3 O- U1 L6 s: D) a4 V) h% C Lan := rootfolder.Internal.Tools.AOLlanguage;
f7 |' W8 F( X/ I! M if current = @.Destination -- else return
% {' ?8 D- c1 b o; m- n+ K then+ ]7 x' K# F6 E0 h
@.Destination := void;* w/ k8 b/ J* a! ~
if @.occupied then
/ H# H; f. v! w U. b1 }: K part := @.cont;4 @3 t. @% _5 G
@.transpOrder := void;" L y4 o2 |7 e- l( k1 }8 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," |+ C) J' [3 _5 y$ i/ [6 `
@,root.eventcontroller.simTime);# t# z. v9 T4 Z
@.HasOrder := false;
7 c4 s1 E- z. ` Y; g7 c+ {4 D. v3 a1 I @.DrivingHome := true;1 i/ M7 ^% s* R% O6 t: U4 f
rgManager.tryToStartTransOrder;
$ `# |6 H" U3 v& [ if @.Destination = void
^* D3 I C7 e: L- ]& ]: Z7 |# X then -- no transport order for vehicle @) u( U1 \/ p- y J
@.Destination :=. T5 r, W7 R# B& W. E1 ]# B
rgManager.nearestFreeStation(@,track.~);
% T) I: m5 g+ J, e4 T6 `; y newDirection(@);
0 G) S: e" J: S5 a0 |& w* x if @.Destination /= void then
% l2 b3 e; B6 u @.Destination.NumReservation :=3 H+ H, w# G" o) r- D
@.Destination.NumReservation + 1;
+ }0 ?1 u( ~* i+ z! `" ?, f4 L end;
) {) t8 @# t* N1 m7 A @.CurrIcon := "drivingHome";
* r+ `% N! U% m# y4 {& [ @.DrivingHome := true;
+ U. M8 D. v& i; V: z) J: J* ` end;
! v7 U" ^2 E9 m+ s/ o8 ?+ y else -- the vehicle @ is empty, both vehicle and part are in the same dock station( h) S& F$ _" k6 p- S9 y6 [
part := @.transpOrder;( S6 r r1 o( K0 G- y `/ y5 F( w
part.move(@);-- load part
" |3 W9 f9 s2 m* {4 p @.CurrIcon := "load";5 d g' v- @5 W2 C2 Q' e
GlobalDistObj := part.globDestination;
- H' d6 B. ?8 \8 o: M& a' d: {+ G assignLObj := rgmanager.rgAssignL;/ \0 P- A, ~, C2 s3 {& ]4 W
row := assignLObj.getRowNo(GlobalDistObj);
0 V5 Y2 b- f4 M7 {5 _7 J' N- } if Row = -1 then -- since 70
) t$ @$ d* S, h; y, g if lan=1 then
" ~3 y+ I# x; t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- ]1 P7 g6 z& S B% g7 _: ] to_str("in der Andockstation: \"",?.~.name,"\""));
2 A+ F0 X) f" z7 |( l( J else
( g% G' A3 ~6 I4 |3 A; x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 {# I* C( b" O
to_str("in docking station: \"",?.~.name,"\""));
+ V- C; s [3 S* o/ h end;
; ?& ]9 h3 X- q _1 S1 O/ K! d& a else2 V! g6 M h4 T* Y+ D+ o
@.Destination := assignLObj[1,row];& ]2 p, ]3 v: l& n0 \7 ]8 Q
end; 9 g, G/ R1 w$ G8 r* L! \5 z5 m
newDirection(@); e d: s, K: B+ H, ~( H% ?' |2 H
@.HasOrder := true;/ l3 l' V: u" V8 ?; a+ c
end;
! H& I8 `3 _4 C, f' _6 j end;
% N# l6 K4 }8 U* I' Aend; -- of the method
: P) X8 M8 z( I |