/* called by: entrance ctrl of the object 'track'
+ E2 s+ _" e0 B2 b" r9 |*/! z( z% L+ i# u. h0 m
is* ^0 g/ ?( s* e3 _3 K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 y- `, j% P8 q4 K" qdo/ d# k0 r N8 s) O+ g6 W9 R2 m
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 K. w$ l8 I" v' M+ N. q* A if current = @.Destination -- else return
& G- R O( h9 q$ Y7 b5 q9 k& U# J& b x then
5 L' H9 T4 L$ t7 s' ?% E @.Destination := void;" l7 v0 A2 g9 r: x0 m @$ K9 ~
if @.occupied then! z7 d: Q- y Y& e
part := @.cont;
6 q% m* ~6 M% \ g4 o @.transpOrder := void;
2 C' m/ @8 A# v! A: z1 a3 z; i+ m c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, M5 I- i( v" [
@,root.eventcontroller.simTime);! {4 i7 @+ K+ }# L" R& p% }& g
@.HasOrder := false;
! a6 L U$ A" c( G @.DrivingHome := true;& h# Q% r9 ^+ Z/ I
rgManager.tryToStartTransOrder;* q; ?! W5 m: |% ?
if @.Destination = void
. M# p* G5 p& R: l& y% [ then -- no transport order for vehicle @) Y) ?2 U8 a9 d/ `+ M1 r1 z; r; `' |
@.Destination :=
5 z& A! o& i) Z; P" B rgManager.nearestFreeStation(@,track.~);3 S3 Z( D' ~4 _8 f
newDirection(@);
! r: i+ f, ]9 X# Q5 H if @.Destination /= void then# z4 y R7 _4 X3 D3 `* }
@.Destination.NumReservation :=
5 f* X' v; Z7 e/ @$ Y @.Destination.NumReservation + 1;
! N# e4 I+ @0 B2 j8 v' k end;
2 k* \; ]4 Z: w; ~: d @.CurrIcon := "drivingHome";: ]% I8 [7 {2 { b
@.DrivingHome := true;
9 p9 D0 W' O1 @& u5 l: W$ c end;+ O' o! t% H5 Q, U9 `, G# O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 K: a9 u4 y4 e& p1 M. W part := @.transpOrder;
$ p) w5 v; K; }- B7 h! `9 b part.move(@);-- load part
! s3 `+ T/ E; K8 S" A2 h! s @.CurrIcon := "load";+ m( T- j0 f! e1 i h5 z" a
GlobalDistObj := part.globDestination;4 F9 {$ x2 X* ~0 k
assignLObj := rgmanager.rgAssignL;
, O" ~7 g, D3 \9 ]8 U row := assignLObj.getRowNo(GlobalDistObj);# B p4 u+ y2 }# S' K ~# Y( M& p
if Row = -1 then -- since 70
N# _, t$ m% z: m6 A# ] if lan=1 then# F7 |) o" \0 j2 \- t9 R. P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ i7 S4 r2 z* Z to_str("in der Andockstation: \"",?.~.name,"\""));
; F o r g; c8 A else$ U& e* l$ b8 L4 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 S6 o- {* o. t; R; } x to_str("in docking station: \"",?.~.name,"\"")); * o$ n% Y; f3 z. k
end;
9 b9 ^% @8 S# `" z else1 D' Y- i& a: g# h2 E# w. ~
@.Destination := assignLObj[1,row];
( `0 K/ p; X! I9 T/ A8 B, ^1 B6 U7 w end; 3 D- R( i, Q6 P
newDirection(@);
I3 Q% X: N' l: i9 k @.HasOrder := true;
# H; p1 ]2 S- n; H end;3 Y% d" c* {9 ~7 t: C# ~! w
end;, }6 o G3 o6 p7 F2 U8 A3 ~1 R
end; -- of the method
1 o$ h- R7 G/ G |