设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7127|回复: 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 p  y% n  B*/
9 d  q! F1 f; Zis
  f( t0 g2 N7 o' @- T5 M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 P5 V/ x6 K  F' E' kdo+ C6 z5 L6 [3 O  C; Y7 N
        Lan := rootfolder.Internal.Tools.AOLlanguage;( }) V+ e- y; L: u* Y
        if current = @.Destination -- else return
$ T7 @% U  d, S3 H$ r5 ]        then3 D8 C2 q1 J' q' {4 a3 Y) D
                @.Destination := void;
$ X1 O! R. d3 A% i                if @.occupied then- A/ e# r+ F; Y: F! j
                        part := @.cont;
7 _% ]" b7 H- e                        @.transpOrder := void;
6 z0 R; H9 G; f- V4 m: ]" x                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ N9 y1 i! h# a* A! D' g% h4 Q& X                                @,root.eventcontroller.simTime);. }$ r% J. e! i+ f2 k; s7 e
                        @.HasOrder := false;( H- u/ F( V9 ]  U
                        @.DrivingHome := true;
5 I0 |1 D2 i! B2 c3 s( L; ?                        rgManager.tryToStartTransOrder;
+ j$ ^$ O$ y: s( W. k                        if @.Destination = void) T' B3 g2 y3 m6 f
                        then -- no transport order for vehicle @9 l( v1 v. p9 a# F! R
                                @.Destination :=8 ~% X4 Q  r- A
                                rgManager.nearestFreeStation(@,track.~);
) X1 {2 c& Z- p# a. e                                newDirection(@);   
% {2 |8 t* l  k                                if @.Destination /= void then# z* r: X& t4 {4 x9 d" K
                                        @.Destination.NumReservation :=3 _/ [0 ^& h: y% N
                                        @.Destination.NumReservation + 1;/ W2 z. q9 K9 r( c# \
                                end;
9 a3 m7 J, R8 \5 s: B. q                                @.CurrIcon := "drivingHome";
+ V4 q0 |3 [6 W# K                                @.DrivingHome := true;
9 {" x2 P& h2 P; k" P                        end;% n2 _4 j/ B1 D$ L+ v$ |9 h9 T
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: E$ u# i2 W" t                        part := @.transpOrder;
) C3 e. V, f# Q9 E                        part.move(@);-- load part
) h4 E2 F1 `" x, b1 n- _1 h7 |                        @.CurrIcon := "load";
$ ~( A  t+ {6 ?: n                        GlobalDistObj := part.globDestination;! F0 a2 \# A" d8 P
                        assignLObj := rgmanager.rgAssignL;! z# w+ a( P" X  Q
                        row := assignLObj.getRowNo(GlobalDistObj);3 w9 \3 z5 b# P+ @1 T7 [
                        if Row = -1 then -- since 70
% ~- W+ H! @, X0 t! Z                                if lan=1 then
( D& G7 O) ~( q+ N- U/ w                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ |3 m, Q% }. {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* C5 Y! U& K3 a' C. m  P; i                                else
4 M& [% i2 O* B: j7 D7 j1 ]                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 I$ M$ `9 w- Q5 w! A
                                                to_str("in docking station: \"",?.~.name,"\""));                                : R. g9 s, M9 _! y. ~$ u
                                end;: P! ?+ U2 H5 W3 z7 v2 y& N$ P
                        else
* o! M# O9 w7 Z  ]. B1 a  u                                @.Destination := assignLObj[1,row];6 b! J* s+ _) m3 V: F
                        end;                          ~2 z0 T" y2 s+ m  H
                        newDirection(@);
( u4 x+ \0 S; ]  z                        @.HasOrder := true;
% X) i2 Z1 W# _+ N1 L4 q                end;# E7 k4 [8 n) D1 F) a
        end;/ P6 F& x+ ~4 q$ y
end;        -- of the method- @3 ~2 I; @/ F8 T* v" s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 g; k) s0 E+ w( n( G' U8 T( ^9 R  [8 g6 L3 ?! t) S2 n- L. E
这是AGV_putin中arrive的method。
3 c$ w8 I* P9 I0 c$ a1 a
, P% t0 h8 \, u+ s! o3 [5 U当到达物料速度越高时,这个报警更多,, U, F3 w" k1 E2 q3 b
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
3 }; l3 T" ~& i! u0 B* C/ e+ \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ ^5 b% \5 N% s( s0 I

0 u3 r+ }3 U# E1 N2 q9 g另外一个小建议,就是move,所有的move都可以这样, g3 S( P2 x# H+ s( F
if not move() then debug end2 u% d# T7 B* c  A9 O0 Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 Q. [3 H) i5 ]# Cplant simulation中的free libraries有AGV模板,
1 e, W3 o. |5 j$ @里面也有案例。! L" e% d5 Z& {' m0 y4 s0 A* ^6 D
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; `# N3 {0 M2 e2 a/ X( ~# T7 O
9 U( @, O# o3 x+ K# {5 y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
8 U- r( i- S5 C  a- _, N; W/ Z6 _7 E' O' X1 d# N. S: @( Y' o
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 \" d2 H" ^* u0 g
这是AGV_putin中arrive的method。
0 p# z/ ?2 v3 ^. c5 ?2 \) @% @3 N1 ?' |
当到达物料速度越高时,这个报警更多,
7 s" z) `) E7 C: t
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-20 05:04 , Processed in 0.017153 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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