设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6646|回复: 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'
2 {/ d. [% G: x: X5 ^*/
) Q( o9 K" a; H7 L/ `+ `, o% yis+ l* S0 \; l( u% }  K0 {+ m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 ?; V2 I+ ~7 E2 z6 ~
do7 g7 w) [1 E7 r, _- }, I" q
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ]) d, a  F$ J        if current = @.Destination -- else return
! N1 o+ c2 Q, `; G+ f! J        then
' q& ^: `. ]& G: B  ?                @.Destination := void;1 Y: q, i: f2 ^9 x' l7 ~, G8 q* `
                if @.occupied then: d: ]' t2 @! z1 u
                        part := @.cont;8 ?; r7 q8 A& t' ]5 a
                        @.transpOrder := void;+ r: r+ d  [( ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 [# M+ u5 ?/ d7 Z0 X% D& k
                                @,root.eventcontroller.simTime);- t4 o! x" _& o
                        @.HasOrder := false;9 `* {8 P$ B  {8 m: o' @
                        @.DrivingHome := true;
: k; d4 G8 x/ y' {  T2 \                        rgManager.tryToStartTransOrder;
8 }3 E9 L3 K$ m3 V% M) A* f                        if @.Destination = void. E; h8 F3 a) W; Z
                        then -- no transport order for vehicle @) |% `" O; P/ I. f0 P# |
                                @.Destination :=& K0 d  z3 R% i* c7 }* p8 ~
                                rgManager.nearestFreeStation(@,track.~);; C1 z* c+ e, x: s! s9 B; U8 X
                                newDirection(@);   0 G! m/ A% n( n& s. l, D9 P
                                if @.Destination /= void then6 F& _) t9 L- I) i5 K' c
                                        @.Destination.NumReservation :=
. u# }) |4 C( B! @6 ^! k                                        @.Destination.NumReservation + 1;' G* s5 ?! B/ G0 H3 p& ?
                                end;
+ ]% M& z0 M0 q- \: e8 r                                @.CurrIcon := "drivingHome";
( n$ A( a  G$ ~- x, s                                @.DrivingHome := true;' }- k$ e; G7 C8 Z8 ?
                        end;
# \7 p& Q' r) A* M/ }4 }1 a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* y  h1 N# B7 s( _                        part := @.transpOrder;) k9 K6 [+ w2 D# ]$ l' i$ ^
                        part.move(@);-- load part: ~' W: z4 \5 G+ ]: Z; p. U: n
                        @.CurrIcon := "load";
- |) ?- [- N* I1 B- _                        GlobalDistObj := part.globDestination;
& `3 B2 p+ c1 Q% h0 b                        assignLObj := rgmanager.rgAssignL;
  H( u9 U% q/ d5 q  E                        row := assignLObj.getRowNo(GlobalDistObj);
2 Q9 M" g2 k: @; \5 ^  `" L, a                        if Row = -1 then -- since 70
  W, u) E2 p, ]9 E  k                                if lan=1 then
' I) Z' q- M. x* ^. D* k                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 a' C0 y4 s, o, U! e+ [: H0 M+ y                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ w' g' |  Q" `6 u/ E3 P6 P5 h4 b7 C& D- m
                                else
- V8 q2 M2 w( L5 ~                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  z- f* i2 Q4 u1 p# F$ q                                                to_str("in docking station: \"",?.~.name,"\""));                                % z' ]' I2 L; K5 k
                                end;
. G6 @) }9 j0 W( I1 F                        else$ L. @; `1 P" f8 y& Z
                                @.Destination := assignLObj[1,row];
% a1 F- y4 S0 R% T, g) M                        end;                        / z0 d; b8 Y( ^8 _3 f' w
                        newDirection(@);
6 n2 K" W* Y% ~6 b2 e. _                        @.HasOrder := true;
8 G- w6 {' f* Q' O1 o                end;
" [, x  m$ S4 A( i  D        end;  v1 L! g+ e/ k
end;        -- of the method
8 Q* @% A$ X1 Z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! U* ]  J6 Y% W: N- Z* J! N8 i& _
这是AGV_putin中arrive的method。- m' j# i4 ^: ~8 L' v
  `) [* E8 p- I: {: U: o9 F
当到达物料速度越高时,这个报警更多,
4 K( B" j6 \3 S& N可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& ^1 b) q) F- L: {6 @4 h. C1 f
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 K+ y+ `6 A$ A# B1 a8 g

& p2 ?8 S% c1 V7 I另外一个小建议,就是move,所有的move都可以这样$ Z. {0 A- y: M* [
if not move() then debug end
  A. w8 S6 B2 D' S0 l  A; [这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 u1 r. [% _6 vplant simulation中的free libraries有AGV模板,, m* o) n/ Y! j- p8 Q
里面也有案例。
" \' l8 N7 D7 d9 ]8 L* f我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 z. ]- U# X$ d& x
6 u3 r. `: b$ j$ p  v( {# P/ m) r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 j; {" @, S! W2 ^- t' x/ a3 U; T! v! C0 _, U) b. ^  t1 c' K& O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / {6 b% k) c' L; N# N
这是AGV_putin中arrive的method。
: ~9 Y. g- R( A: K$ \3 l6 }# H+ f$ H) s
当到达物料速度越高时,这个报警更多,

- B% ]' |) k9 I! l- t另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-18 09:17 , Processed in 0.020434 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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