设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6309|回复: 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'
  M) Z& \8 \2 e. ], @+ I! Q*/
2 J8 f! L# N* ^3 Sis# _3 z' q: i0 G6 F! N
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ U) v; Z  Q( a- g: f0 Fdo
4 b3 [# `9 z7 Y+ n& l        Lan := rootfolder.Internal.Tools.AOLlanguage;
$ @: q, }+ z. P6 i0 R- X1 r: r; T3 K        if current = @.Destination -- else return6 P) M! b1 b8 r1 {& ]4 L8 G
        then
" X: X& j! y3 c                @.Destination := void;9 W7 F0 |7 }3 v7 `
                if @.occupied then
/ W; m% Y$ O+ q4 Z% D                        part := @.cont;( @+ y# J0 I( n
                        @.transpOrder := void;
# n3 ]1 E5 y, {& e1 }                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. A. {7 H, _4 t9 `
                                @,root.eventcontroller.simTime);
* J. ^' N! j: G+ I7 c2 O                        @.HasOrder := false;
/ f; L% @" ]. v' o) d                        @.DrivingHome := true;: y6 r" J1 S' G1 a- U
                        rgManager.tryToStartTransOrder;
; o% u: ?* n+ ?) S& q                        if @.Destination = void
: w1 k, i. g# ]5 b% ~5 B                        then -- no transport order for vehicle @
& b, W5 |& B3 K  V2 E                                @.Destination :=
; \" _3 I% l! K3 Q- ?" ?) ?                                rgManager.nearestFreeStation(@,track.~);$ ^* u7 j, v7 U$ I: D  I
                                newDirection(@);   7 s( [6 }2 X. W# T' h
                                if @.Destination /= void then
7 V0 x+ {- T4 g! }3 V1 v/ _                                        @.Destination.NumReservation :=
& Y  U; N- M2 S+ ]                                        @.Destination.NumReservation + 1;6 N- ?, \4 D- n% {  m
                                end;1 d9 O5 \5 @8 \2 R5 b8 n
                                @.CurrIcon := "drivingHome";7 a6 X$ a; v( g9 ^- G
                                @.DrivingHome := true;' k/ Y2 a- A' T7 I% T/ K- `
                        end;; B, j& n& c! ]& B9 o) ^2 |; `+ C
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) w6 b% P. A! t8 V8 \# H1 E5 Z                        part := @.transpOrder;
) N% I4 E" Y/ c! M                        part.move(@);-- load part+ X  `8 ~) a' \8 z: H5 v) x) h3 n
                        @.CurrIcon := "load";
! q; L! Q" j" c; {" i" n) K                        GlobalDistObj := part.globDestination;
9 C2 E: i7 f8 f7 s                        assignLObj := rgmanager.rgAssignL;
3 g0 }  j' @8 Y* E" n                        row := assignLObj.getRowNo(GlobalDistObj);
' k: y$ a" I' {: ]+ z) ~, [                        if Row = -1 then -- since 70
' p3 K8 s8 ?" N( i' W4 ]) e                                if lan=1 then, j& ~4 C4 N" d% q1 }
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; J( Z$ W0 ]0 e3 g
                                                to_str("in der Andockstation: \"",?.~.name,"\""));# K  c9 q. i( h2 ?
                                else: V0 n$ O! I) n( Q% B- F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 c  f+ P( O/ s& C( L2 ]- f2 i
                                                to_str("in docking station: \"",?.~.name,"\""));                               
( X; T4 U+ N" V3 A" v4 o                                end;
: r' f; r: N; s/ u* v1 g                        else/ J. Y) V1 B2 E/ S; i: s" A: D
                                @.Destination := assignLObj[1,row];' u6 ^4 s% h' G8 ^" q
                        end;                       
6 a6 \9 k( Q- U9 E                        newDirection(@);
1 D& q: q9 E' h1 x3 w                        @.HasOrder := true;7 G& H0 J+ C6 E, F& i
                end;4 X& Q! {/ E, s3 ]; x
        end;+ Y: X' |; {' l/ n; @$ z- `+ ^+ _
end;        -- of the method9 }2 t0 Z0 T( c! ^$ Z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 o& Y* ^% o( R( n3 A6 C& d0 w3 D, d

& s% \) f2 N- `3 a( z这是AGV_putin中arrive的method。5 {5 T" C: _: O
; i% G# t: R4 z( J( F% Q; @2 z. I7 n: a
当到达物料速度越高时,这个报警更多,
, D$ e2 l1 R# t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; A; z3 ]1 z0 L/ ?) X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' b1 _7 Y& X/ ^, B5 V* ?& _

+ o6 E) Y& k5 n9 ^, R另外一个小建议,就是move,所有的move都可以这样
: f' L# M: E7 Rif not move() then debug end
# j! D- P/ |# G& `这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  `! K2 T/ A( cplant simulation中的free libraries有AGV模板,9 T& V% m% l) x3 V
里面也有案例。
: A; e" q( W' Q: L4 x0 ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ Q6 ?+ e* c9 H: T
, p) M. ?$ H) O/ x4 a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 v+ [- r, y( K0 G6 o/ U/ h! Q. J/ Q9 V4 `% n
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / t* }9 A! C* T5 `7 l
这是AGV_putin中arrive的method。1 I( n. x( H0 P! U& L

/ B* `: e) h3 e当到达物料速度越高时,这个报警更多,
( I& O8 K0 O7 ~: |+ H: ~
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-30 01:18 , Processed in 0.020328 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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