设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5787|回复: 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'
* I* b' z( L& m0 _2 u*/
6 T" E4 a1 _3 ~4 Z) ?6 }$ Uis) [  M) k/ }$ n! i# E$ v9 Q+ i
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ H2 R7 u7 X% V2 u
do6 K0 R+ N# H) c* W$ v9 A
        Lan := rootfolder.Internal.Tools.AOLlanguage;! ]/ p, _" X% k8 U1 }
        if current = @.Destination -- else return
) V; x+ C5 l. E- M: U        then
3 w8 i+ A/ v7 D! C                @.Destination := void;1 n& f. v$ X) R/ z
                if @.occupied then
* _8 }2 n, J$ s4 R                        part := @.cont;
; Y# R. Q9 s3 Y2 }/ ?' \$ S                        @.transpOrder := void;! q7 G& d, y- @% T1 V9 r
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% h$ c7 W* A" S: \$ I- k9 V                                @,root.eventcontroller.simTime);
! U, C+ V& y/ Q3 l1 x2 l, n                        @.HasOrder := false;$ f9 ~8 g3 X8 W
                        @.DrivingHome := true;
0 |% T! e# b( W  h/ m! J                        rgManager.tryToStartTransOrder;
9 X$ b, h/ r. T$ I2 K& c                        if @.Destination = void0 w' r: a" n* H8 A% E4 ~
                        then -- no transport order for vehicle @; H/ G+ m0 O+ U4 k. n' B- _
                                @.Destination :=
* u' @3 P7 O" V3 }, k1 q% ]7 U# q% q                                rgManager.nearestFreeStation(@,track.~);
/ }3 P5 |: h' @) F                                newDirection(@);   ; i, @8 s/ @0 L& f" m1 I8 R0 `" R) D
                                if @.Destination /= void then
) p% A" T  {/ e2 T2 q( @: m                                        @.Destination.NumReservation :=
# a& l/ H+ L! \; ^& J0 j5 g                                        @.Destination.NumReservation + 1;: x+ l5 I% s/ d) y
                                end;
5 R9 w, I  ?7 _: P; s                                @.CurrIcon := "drivingHome";
  d3 l7 G" \7 o' c6 l4 e( T0 O                                @.DrivingHome := true;
8 x( a! z$ o* s$ \/ t& {" c                        end;" _9 v  \0 z0 w; b# D2 o2 f
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 Y1 B6 d( f+ }! y( \' E% i                        part := @.transpOrder;
$ N3 ]& ]" ^- q                        part.move(@);-- load part2 x+ c( X) H' z- E+ n  k% n! r
                        @.CurrIcon := "load";
* L+ G# Z) P" r                        GlobalDistObj := part.globDestination;$ s' \8 u1 ^. e5 X
                        assignLObj := rgmanager.rgAssignL;0 ^0 t/ |) ]( _& T6 u3 {9 c! w2 H
                        row := assignLObj.getRowNo(GlobalDistObj);
' C  d* E4 S2 ~2 }3 I, `2 }% v                        if Row = -1 then -- since 70
8 t  k; I7 h9 M' Y2 `                                if lan=1 then
: r* L3 E- t" i0 t0 |# C                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 w# J+ x; Y" @, K3 D* V                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 v% w4 _& W( G3 {  `  [5 Z( Q2 a. e! H9 b                                else
7 z" V: f2 P" d1 v$ F3 _                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ?, `! v. s0 }* I2 s
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 x1 n3 i  x/ h9 S" }/ B, o
                                end;0 b) ~( e2 J: k& a' q
                        else
0 }+ |$ g% h! m) e5 ?. V                                @.Destination := assignLObj[1,row];
6 ]0 N: p. ~$ J* u( e                        end;                       
+ J) [. R5 z& H9 R                        newDirection(@);
" U- Y7 J0 H  L& j& g                        @.HasOrder := true;" u5 K7 {4 Z. E6 f6 p& P
                end;
& P) X6 O2 E, M: k6 L        end;
( ?( L: q. K9 Z! [  Oend;        -- of the method8 y/ F: N- i  B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 o2 |5 K& K# s/ |# k3 j8 F

1 Y. K! i, g0 q# {) d* l这是AGV_putin中arrive的method。
- |3 B, g/ d1 c- o) ]5 b$ F2 h+ C' V4 K9 Q+ S& z9 |
当到达物料速度越高时,这个报警更多,
, f8 D4 A8 f3 T6 y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: x6 A( q1 b! z& [: @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& j+ Y" s  E# d+ h

5 s; H6 ~5 {- p& r. A% w! `另外一个小建议,就是move,所有的move都可以这样
, h( o; d& G, }/ @/ @. o' vif not move() then debug end, r7 K# l, K- _$ ^: p- g3 ~
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' c4 |6 B1 @+ ~
plant simulation中的free libraries有AGV模板,
* b; l9 `8 ]1 v6 V0 ?! k里面也有案例。8 ^0 P/ s5 q& ?- E5 d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ C7 o8 \5 m# w& U. `5 K+ q4 K" q2 p8 r
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " {8 y9 q  b  i$ D7 b  T
7 F  U* d% \2 V: x
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
/ U9 c4 h. |) u- i这是AGV_putin中arrive的method。$ J6 i% c% }0 E9 \$ C, q5 r
  d; J& }: @' W' E9 n
当到达物料速度越高时,这个报警更多,
( [- V  Q! D5 U
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-20 21:08 , Processed in 0.020248 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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