/* called by: entrance ctrl of the object 'track'2 B4 \! H) z& m5 c1 y( L. W
*/
3 I7 F# \( b7 N8 E5 }/ l" X Zis! L. d0 R; |) Y; O+ i7 Y1 h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 y7 U# y8 E1 Q K3 A; N& x
do
) `# ^' X3 r6 A/ T Lan := rootfolder.Internal.Tools.AOLlanguage;8 ?- W; A) b2 N" k$ m
if current = @.Destination -- else return7 x) }9 v! O& J9 C9 _3 Y7 E
then; i; ]/ B0 z9 W2 s
@.Destination := void;
% m0 f1 N8 P f: o! l if @.occupied then; L) u! h4 @$ }
part := @.cont;2 _5 u* Y+ H% z" u3 v0 {( u- |
@.transpOrder := void;# a4 ^% Q6 P# O2 p0 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) Q: n; d7 ]5 E0 {1 n) J @,root.eventcontroller.simTime);( L% Z# Q/ O5 [% Y$ |2 n
@.HasOrder := false;
' `# m4 |6 w4 m' Y8 G5 p @.DrivingHome := true;
% D9 T; k }0 c8 I3 Q) [/ J rgManager.tryToStartTransOrder; `" j, A( W3 C5 a: I+ b& F! ]
if @.Destination = void
2 o4 G9 T. d% Y' P+ L then -- no transport order for vehicle @
. u% f: D5 j# ~% A, A& j, N3 Y @.Destination :=
- p$ }' i) s" H7 x* c3 t rgManager.nearestFreeStation(@,track.~);
1 u" i* u0 g% ]: e& j; m* c. o3 M' T" X newDirection(@); ; r2 z2 c6 s/ m5 l6 z
if @.Destination /= void then! G& J+ @/ u$ ]3 M \
@.Destination.NumReservation :=8 [5 a' P7 j+ f5 ?; Z3 Q9 }( W5 J9 B0 ^
@.Destination.NumReservation + 1;
$ J1 B: f6 w* ~0 X% a$ R$ k end;2 H: B: w# w' X' e" u5 G
@.CurrIcon := "drivingHome";
! A9 c9 s+ ]$ s W; X8 ]" ?1 ] @.DrivingHome := true;
- @1 e0 W3 [% l$ c2 u7 U8 E% a end;& g+ l# W+ ?7 l0 w+ ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
R" B/ j }. |% u ]) `( Q part := @.transpOrder;/ R! X7 n0 Q2 }3 S" Q) P0 C8 [0 U
part.move(@);-- load part
4 t/ T* W% ]# {- A0 E @.CurrIcon := "load";
4 E0 P3 J8 e2 l% R GlobalDistObj := part.globDestination;9 N8 B) T7 ]2 ]1 ]0 a8 t$ c4 n
assignLObj := rgmanager.rgAssignL;2 a# ]' ?8 ~; @& ^7 E h
row := assignLObj.getRowNo(GlobalDistObj);
9 _+ v6 j( j5 G" N. M1 L: s; C% z. [ if Row = -1 then -- since 70
" {2 ~' Z4 E H- |* b4 Z% H if lan=1 then, L6 W# T/ n, `4 r2 c- e; @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- p( k+ j+ A: k' C$ L, V# F to_str("in der Andockstation: \"",?.~.name,"\""));' C5 Q/ y1 C8 ]8 t! U
else
& m% i6 Q6 N) B. V; K! Q ^9 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 l6 V, b8 G# W# Q to_str("in docking station: \"",?.~.name,"\"")); ( h5 C# k$ {/ C. h6 f6 I
end;
" ]. F; W$ Y3 G* Q/ i' h* K) Q% B else
/ h: V2 ]/ y) X6 M @.Destination := assignLObj[1,row];
8 r9 J5 o) e8 p) f; M/ l3 f1 _, q- a end;
* I0 B: @& }, D* B, f newDirection(@);3 _4 J1 c) M; C7 G
@.HasOrder := true;7 m B- d9 \. p- z: }* L3 l, u
end;
; Y- i% ~ R, T" p end; Q# y/ U. S$ Q" I( c: g' B& q
end; -- of the method
/ `- r$ Q+ m4 \7 K |