/* called by: entrance ctrl of the object 'track'$ A( ~" S+ a5 B. B4 y6 `5 b" l; c, ~
*/9 [* l2 p1 D- V p( f
is) A& w* P5 D. R% o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 K; n. P1 I8 e: P* hdo8 D, N! ^3 U( B) \
Lan := rootfolder.Internal.Tools.AOLlanguage;4 n" u5 Z4 @- x# P2 N* s% `
if current = @.Destination -- else return
0 a8 i! W& Z- W V0 ^6 j; p5 j2 I then. [6 i+ D7 u: B) E; U
@.Destination := void;) z% j( D9 |1 u1 g/ J
if @.occupied then
. i0 j# m7 R7 h* @ part := @.cont; Q5 P, r4 k2 A. m* q# |' J, t4 N
@.transpOrder := void;
$ ^+ C. b+ ~( a6 s5 ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 J$ r$ B8 e Y0 n/ z3 W
@,root.eventcontroller.simTime);
4 s3 Z: a4 f+ N) y, f; k @.HasOrder := false;
" ~( z( l+ T( w4 B3 E8 B; u/ r4 M @.DrivingHome := true;% ^7 l& z/ k( W" C1 L2 y. Q( C
rgManager.tryToStartTransOrder;
# ~$ J) i& a4 y. M) \ X if @.Destination = void
+ j" O7 l2 M2 H. B# w then -- no transport order for vehicle @/ o3 C0 \* ]* k( \
@.Destination :=
. z: o$ x% L9 Y/ l6 U rgManager.nearestFreeStation(@,track.~);5 N$ r5 _5 s# J. e' Y+ f" J
newDirection(@);
: a! B9 ~/ }. d: v. c! v R if @.Destination /= void then* ^4 p5 R1 M& b: H
@.Destination.NumReservation :=
8 `$ X5 X! v2 r1 A" r) Y/ J" L @.Destination.NumReservation + 1;7 l# e% R$ ~( u4 H" P2 z
end;# A' y2 L8 ~. u5 q
@.CurrIcon := "drivingHome";
9 P- P% z9 l. X; ~ @.DrivingHome := true;! u! F8 \% k" p- i' q
end;. `4 L6 E5 W9 o) t2 R I5 ~# _1 W1 q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 P. f7 k, C( Z4 n" X
part := @.transpOrder;) V; y3 V& b4 A h0 M4 s
part.move(@);-- load part
% v1 u$ L$ {3 C" {$ U/ F @.CurrIcon := "load";
$ b! ` ~* ?- }! n& a GlobalDistObj := part.globDestination;8 e: ]- D5 N! D
assignLObj := rgmanager.rgAssignL;
2 {" R- n3 B& X' X/ j1 k row := assignLObj.getRowNo(GlobalDistObj);9 m& G% I3 [/ n( y b6 ?
if Row = -1 then -- since 70
f1 e9 D8 l* [# e8 K# o0 O if lan=1 then& a0 W; F& \ X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 i7 b! z& `$ ?6 } to_str("in der Andockstation: \"",?.~.name,"\""));
/ x# w4 b0 }8 Q else$ S" H# {8 m* m: g" m- D4 }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) P. H$ J& r; N$ [# a
to_str("in docking station: \"",?.~.name,"\"")); T K+ A' r3 t6 _& ^1 B# s Y
end;
/ @% |4 s8 H1 o$ z: W2 [. a- } else C) y0 _( O( r
@.Destination := assignLObj[1,row];
' i$ c5 y6 w3 Q end; 7 D+ i! o% b, e* A4 c
newDirection(@);
$ {0 l. G& q' F9 k @.HasOrder := true;0 {2 {7 f6 v. H# {( ]) s8 U
end;
) f6 f& g4 z3 T6 h& k3 a end;
$ Q1 w% ~; I# }end; -- of the method) Y! P; C% o- s" A
|