设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5910|回复: 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'4 B7 j  Y  {/ @
*/
/ {$ ?' Z. J! C# u& Wis
9 u" t; A! N) ~( a: w        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 J* `) D* R2 ?+ b; s9 c( \. U" ndo
1 ?% \& X) {9 b5 d% V( E2 P' g. k        Lan := rootfolder.Internal.Tools.AOLlanguage;
( C# a" \: d0 d7 m        if current = @.Destination -- else return1 S0 w) _( \8 C, L3 P. L+ S
        then
- }/ g% I, m% [( }4 ?+ k( i                @.Destination := void;# G& n# g; h4 Y. S
                if @.occupied then
& S3 `/ f0 j6 R, H) F' G                        part := @.cont;
; x+ f* F; ?& o6 Q                        @.transpOrder := void;( f& x1 c& q7 c4 P& u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: m2 P" l* O4 e5 W4 ~, \9 g
                                @,root.eventcontroller.simTime);
, g2 L2 t  o9 S$ `                        @.HasOrder := false;
2 K, N1 ^* W6 Y6 a' u                        @.DrivingHome := true;; Z. {+ p6 I5 m) I6 x) K) x
                        rgManager.tryToStartTransOrder;' j0 o- r1 J( `# b  H. i. [/ Q) H
                        if @.Destination = void
/ L5 |: a+ `! \# ^3 Y                        then -- no transport order for vehicle @
) v" O  |# X' H) d0 E; a  T                                @.Destination :=1 [$ O5 I; j+ w6 Z" D" G
                                rgManager.nearestFreeStation(@,track.~);: L+ t+ V1 M0 N, y
                                newDirection(@);   
# ^  B1 f1 ]0 @( D  Z/ D                                if @.Destination /= void then8 l5 X2 M4 x# G: U- \, {
                                        @.Destination.NumReservation :=
* g; s8 y" b/ N  F0 m                                        @.Destination.NumReservation + 1;( J* `! T" L* ^: Z1 j
                                end;
% R. s- r3 N( B! _# ?                                @.CurrIcon := "drivingHome";- s) n. J/ i0 C" b9 k  `' M
                                @.DrivingHome := true;& w" d$ n! w  X( u: ~! v+ q
                        end;
+ B# s$ K) U4 y! K! L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, G  j) \" @. I7 N
                        part := @.transpOrder;
; x% T+ Y7 }9 J                        part.move(@);-- load part
+ c7 o2 I- Z. ~' d1 A2 l* f                        @.CurrIcon := "load";* k1 W8 O# T- W' i; K8 }  S
                        GlobalDistObj := part.globDestination;
  D! ?8 s" Q2 t3 A/ L2 r% o& V6 R                        assignLObj := rgmanager.rgAssignL;
7 W4 @& H$ B+ Z5 C$ Z+ F                        row := assignLObj.getRowNo(GlobalDistObj);
* @8 F5 ]7 }& D. p) `$ `/ B                        if Row = -1 then -- since 70
0 x/ p4 S6 x  U; i( ?& M) h* {                                if lan=1 then3 u  m; f; A8 _& S. C
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; J" w; @# F# L, C$ h                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 p2 D4 w# L5 b& a                                else
. i+ `% f; F; D; T# t                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ n2 r; O& z! A7 \; O  k4 @7 a                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 z, ?! ?: S* }( S6 A                                end;+ z# B0 z' e8 q0 q* Y4 H
                        else
& B/ d. [) W; s& r, s- ~: N9 A                                @.Destination := assignLObj[1,row];+ m) }8 w# [. a# h$ f
                        end;                        $ u* J. k  U; y7 \
                        newDirection(@);, Z2 s5 J. h' }3 f; x" k
                        @.HasOrder := true;
! o9 l' a7 K/ F0 Q* b7 J                end;
! z0 o6 q% k0 K, W7 z        end;4 X- z" N$ I" {3 B2 p6 X3 p+ {0 [" D
end;        -- of the method
, E  Q4 {" V/ F: D7 z& r+ Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- ]8 v0 O1 A1 M/ c' e' X0 g; b' S* j8 S. K; u4 H" G# A
这是AGV_putin中arrive的method。2 i- z' @, q, t- [+ l, p

0 ]+ o; E0 g# X, `6 R! A当到达物料速度越高时,这个报警更多,) q4 p! y9 a9 B; x% o
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 f: G2 g! D2 f) n程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 M* r# q) \0 X4 a! `5 w3 H
, h) T9 A1 b& h. B% ?1 q2 c
另外一个小建议,就是move,所有的move都可以这样
+ I9 o% j2 a* E" m' F% \if not move() then debug end+ s2 ]. B; \, a/ }" z/ r4 ]1 U; F5 e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
0 Z" T' s2 o% cplant simulation中的free libraries有AGV模板,# {3 A. C( ]: @( n; j) H
里面也有案例。" W" {% V' X& U8 q7 o. t9 m. ?' W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; o4 F" i! r' s9 a' f1 N6 F
) s2 c0 }$ H* [! b- P  V6 q: k% P
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : z, x: ~8 _& ?% o" m' f; |/ b! s; C
& q* U3 j4 Z* u* Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! p* I8 M) F( Z3 T: h
这是AGV_putin中arrive的method。. p6 M8 A8 A! Q
# t, G# j6 r- H
当到达物料速度越高时,这个报警更多,
+ X  W8 i: |" J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-1 09:28 , Processed in 0.023251 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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