/* called by: entrance ctrl of the object 'track'* H' d& ?! d) c4 `
*/
- V; _4 m( a3 w; _* c# fis
9 q+ g# s" p6 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;* z* d! Q1 y5 _ M
do, z, ]2 G2 T' m" W- Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
; x# J# z/ Y+ W$ S if current = @.Destination -- else return& Q' }$ S5 E" Z# y: V/ e) L5 A' `
then
9 n1 d) `( B5 L5 Q/ P5 c {3 f3 c4 Q @.Destination := void;
; z2 E6 D. u& _ V& |" r if @.occupied then5 K6 J6 G. o* p% L, L) D$ }
part := @.cont;' k1 Y: z0 D5 q4 m, F) p
@.transpOrder := void;+ u6 p% \7 Q1 a/ v) M* h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: T# c: ~% Z4 z
@,root.eventcontroller.simTime);- W" U' ^4 m2 J6 ]
@.HasOrder := false;
, [8 F+ ?! q1 P: h; f2 h @.DrivingHome := true;1 t- C4 ~" o% d' o/ n
rgManager.tryToStartTransOrder;
: N/ m0 t) p# `' R if @.Destination = void# f5 @3 _$ _* q0 B x
then -- no transport order for vehicle @
% v9 a% B1 ~# N& ~* L @.Destination :=; s8 f6 \( }0 }3 t9 S1 C0 W/ W
rgManager.nearestFreeStation(@,track.~);
1 Q6 Y8 ~' [3 v+ {# W newDirection(@);
* W; _4 }1 t2 k( X" @. c g0 { if @.Destination /= void then' m& M9 a5 L: H! q8 b6 a
@.Destination.NumReservation :=: }1 E: {" k2 V
@.Destination.NumReservation + 1;
( @% {, @% c- _ end;
8 R. h! v; Z6 r6 n( d# y! U* ?# {/ f' f @.CurrIcon := "drivingHome";
- p7 |7 P% D! Y& U/ L, s" L1 ~3 o @.DrivingHome := true;. ~9 a3 g$ |& Q% ~& a2 [/ U$ [
end;
/ Y, Q" C0 E1 o$ G0 k& \2 L" V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: c# N9 s" s R5 Q0 V7 ~! X part := @.transpOrder;
( @ f' B* U1 ]9 l part.move(@);-- load part; X; y# v; J, H
@.CurrIcon := "load";& g- g" `) a q
GlobalDistObj := part.globDestination;, O$ S" ~0 }+ l) [, L% k
assignLObj := rgmanager.rgAssignL;/ I7 d2 N# U, L/ ~ D* u
row := assignLObj.getRowNo(GlobalDistObj);
6 R: X4 D8 e, A S if Row = -1 then -- since 70, d) r* W3 E4 K/ L0 F
if lan=1 then+ ]! g0 |. y9 g+ p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 v9 F) s5 l; { o
to_str("in der Andockstation: \"",?.~.name,"\""));0 J+ a. X8 Z2 ?, z* x9 J
else+ m- w* U- _# o i) Z: a+ {$ `) R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ?; @6 x0 `; l" J3 r+ l
to_str("in docking station: \"",?.~.name,"\""));
' {. O# @3 r7 ?% X u4 L end;
2 w3 `' w& e& N) j# h else
D0 C/ Z! L. p- e4 w @.Destination := assignLObj[1,row];7 d' U' W P3 R* P+ v7 O
end; ' ?! }. J' m% Y% a
newDirection(@);
* J7 v1 M% ]! e- E( a N1 W' V @.HasOrder := true; G* C( k: `) ?
end;
4 O1 m; f; p( \/ Z; N end;
; Z1 K) B* `8 p' q# D& wend; -- of the method# s; o% R( R9 P! {: `, @- {
|