设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7556|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'3 b' `# ], h! b9 K
*/
: {* I, F( q+ U7 r6 F4 [$ b5 l% Eis
2 l1 ^# V" j4 i9 l% {8 [        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 r8 n4 n. `$ C! ]1 udo' {. C/ k9 A% l2 ~9 W6 Q4 {
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 ?  P  J! P0 U/ X        if current = @.Destination -- else return" D' ^# ^, C9 Q: y  c6 s
        then/ z6 D3 M* g$ F
                @.Destination := void;
7 q; H: J: `- l, J; ^% Z                if @.occupied then
7 f% T5 a, M4 n                        part := @.cont;
  J5 L- Y' R% V' B9 Q) J                        @.transpOrder := void;
# O8 R/ @0 ^. p' z* `                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 w: }! K) ~. y$ Z# j
                                @,root.eventcontroller.simTime);
2 q8 b; `3 h! [! F8 _. v% i/ u& w                        @.HasOrder := false;
& P8 g0 b0 W; C                        @.DrivingHome := true;( p: ^0 N2 j( h7 ~
                        rgManager.tryToStartTransOrder;% {+ M5 w' ?: e% P
                        if @.Destination = void- o& ]# e6 s4 S0 X9 W1 F
                        then -- no transport order for vehicle @* e# u- @: |" K" b& U- T0 f
                                @.Destination :=7 W+ b) n0 ?0 v! X, F1 @
                                rgManager.nearestFreeStation(@,track.~);& u& X: Z! y, x" [. c
                                newDirection(@);   
, [$ B( U6 w# K                                if @.Destination /= void then
8 r7 ]9 s6 o4 m/ O  l2 i3 c+ N# c                                        @.Destination.NumReservation :=% N2 c5 U! K/ }3 V- N- G& m
                                        @.Destination.NumReservation + 1;
' i, s0 g. Y! R. U9 l* ]0 k                                end;
$ z2 O$ P5 b8 W1 B  {                                @.CurrIcon := "drivingHome";
1 |9 h: h; U' v" D0 E4 f7 ^7 I" \                                @.DrivingHome := true;& V7 b+ `1 i- S. V3 G' q- N& c
                        end;
* B' c/ b; S' |- W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" A. F0 y! @2 e6 }$ [% U# d8 y                        part := @.transpOrder;; G) k; ^$ Q: m% N. _! @* Q
                        part.move(@);-- load part
7 F' i& y& c; l# g1 ?                        @.CurrIcon := "load";2 a3 `* a  G1 u# d: v% M
                        GlobalDistObj := part.globDestination;7 R: [* W; O5 r! t$ @7 S- d% l
                        assignLObj := rgmanager.rgAssignL;! m4 D1 P2 ?; d9 F6 N- |6 L- s/ \
                        row := assignLObj.getRowNo(GlobalDistObj);
& ?4 \9 I4 L/ x$ b- ~2 Z                        if Row = -1 then -- since 70" o* y0 Q0 y- f# @: k* X
                                if lan=1 then
4 ^+ |0 r! ~6 S                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, t8 U) u5 P9 M& J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, F+ `/ r5 y% M" w
                                else' q. o) L' x7 m- w2 m- V& E! |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% f( V, U* u' a% ~$ T# e
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ [9 s2 b( Y. w9 \$ v4 K5 U' \) K                                end;5 G6 L6 ^' P/ M/ s  u% h  h1 v+ b5 N; S
                        else3 H5 q% e" C/ N& G/ q+ f8 T2 ~
                                @.Destination := assignLObj[1,row];
2 {5 x  u* k4 ?! q9 h                        end;                       
  p: A4 Y; R5 [( W" ?                        newDirection(@);, P" w3 r  `. K# u0 |
                        @.HasOrder := true;
3 A' \6 l, v- x4 q1 x                end;* W0 F0 e" R& j- H8 h3 O7 j
        end;, h/ |2 Q  E1 @; `7 ^. X2 ?+ ~
end;        -- of the method3 i0 b6 q2 `" a" {- N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 Y! X- j4 `- h0 Q' B% X5 {3 p
: u% \; W7 \* B4 i( V这是AGV_putin中arrive的method。
. k/ L: ^" @* {: J+ o1 S' a! X
" K$ J( ~' |: X' c; J* Q/ B- F% N当到达物料速度越高时,这个报警更多,
- Q3 g3 b# {9 T9 \可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) c1 d, V; x5 E& H6 h程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- L; A$ v9 L! x/ c' a, `# g: `$ z: \
另外一个小建议,就是move,所有的move都可以这样8 f, Z2 H' y2 z, o4 I
if not move() then debug end& k6 N2 X2 u% u/ A, U. o  Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。8 s" B* C' g, s$ M' C8 r: y
plant simulation中的free libraries有AGV模板,
8 P0 n4 T! L- B0 ~; t里面也有案例。" E  B2 Z5 H* v& \! X
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 `: B6 O) f# X% O, G3 p) p  L/ f$ j

( Z+ f0 @) |/ d我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * z' ^1 h+ J9 i
+ e" t# b( B9 w  [8 H! N' h8 N
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 f) z) p& w6 A# l这是AGV_putin中arrive的method。
) d! K7 y4 g: W4 n8 z" K( S: Q8 h3 Y: ~- o* y3 a
当到达物料速度越高时,这个报警更多,

' a8 j! ^3 K# f$ Q9 C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-4-17 16:45 , Processed in 0.018301 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表