设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5674|回复: 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'
+ G: A" w% w* E*/
2 E# F) T1 @( N5 Sis6 O( U' ?4 `: }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' g7 g7 w0 r. q+ Hdo& X' n7 y$ T8 [' N2 @
        Lan := rootfolder.Internal.Tools.AOLlanguage;" |! R& ~3 [& B
        if current = @.Destination -- else return
$ k7 Y: s, o# V2 Z  W* y3 q        then
. K) x1 R# ~& i                @.Destination := void;
6 ?5 H$ l8 L9 B, l+ F- r4 J                if @.occupied then
8 {# W( L" t! c2 S                        part := @.cont;
) K& i/ g' q* e. w. N                        @.transpOrder := void;
0 l$ v0 f3 P% s: ^  t                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 x5 ~5 [1 s, i" x+ I; K& b
                                @,root.eventcontroller.simTime);
0 _: t3 p* X' `* U. N( n                        @.HasOrder := false;5 S( X' B& B4 }. W# S' x
                        @.DrivingHome := true;( j5 |2 M3 @7 l
                        rgManager.tryToStartTransOrder;9 ]" s8 w' S& O' o3 ?
                        if @.Destination = void8 g0 k' ^, p$ |$ \
                        then -- no transport order for vehicle @
5 E. V7 d9 J9 a9 p$ |                                @.Destination :=1 j- y# i/ m2 |+ {& }6 B
                                rgManager.nearestFreeStation(@,track.~);5 ^  u  R; H- g9 W
                                newDirection(@);   
) _: i0 B7 B" ~6 m5 K                                if @.Destination /= void then; N' a+ |* f$ q- v) z/ B
                                        @.Destination.NumReservation :=
, h, m  ?9 W4 l7 I0 X0 M9 T; Q                                        @.Destination.NumReservation + 1;
( J5 d; w5 d. S                                end;
/ ?# |: W! _9 ~5 Q3 I: @8 Q/ T- V                                @.CurrIcon := "drivingHome";
: u, k5 a) u( N/ M+ h0 i                                @.DrivingHome := true;' L7 [0 e+ O6 s$ I& T
                        end;
" H$ Z& A+ H  H0 a6 Q) U                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, l+ s. M( P. b7 c" W; V. @                        part := @.transpOrder;
7 O  p4 ?/ r* a: m( E                        part.move(@);-- load part
& B* p! d$ r, a7 V2 f                        @.CurrIcon := "load";
& p" u0 {( h6 W+ S                        GlobalDistObj := part.globDestination;  |! A# b4 E3 L& y2 s
                        assignLObj := rgmanager.rgAssignL;
$ ~. ]. z$ I) O% L. u                        row := assignLObj.getRowNo(GlobalDistObj);- h; u0 b0 `$ F
                        if Row = -1 then -- since 708 b+ @) @" H) x& N' G/ ~" |" U
                                if lan=1 then
) z: R' k, i* x8 S$ [5 S8 h6 g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 f' o2 n/ p9 `" p0 ^+ M. m# ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));: l2 ~  B" i: d4 A: t$ _* ^* R
                                else
; j& a! o; J; ]9 h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ m. B# ]& t- `: e' A                                                to_str("in docking station: \"",?.~.name,"\""));                               
" t. _/ z, |9 f                                end;
  k8 b, G0 H# E$ _                        else! v( p, z0 J+ x7 n* T
                                @.Destination := assignLObj[1,row];
  z( v& r7 G9 r                        end;                        ( K0 }7 H# q# @) C2 z1 [& D* T
                        newDirection(@);
' M% @7 W" P# z+ u, `) h                        @.HasOrder := true;
3 T2 U3 x/ p& M7 [                end;
) P- Y# v( |: d' [        end;+ b- P  }9 h/ }% w6 P
end;        -- of the method
. ]& G# V$ S  v; [7 O! b2 C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * U- h! ]3 Y) Q) F& D+ |" O. ?
% |: V8 c- N7 l
这是AGV_putin中arrive的method。: F% C" @1 a) W; q

) n" e4 c6 }% o; c当到达物料速度越高时,这个报警更多,- d$ O0 |) [0 k% }; ~
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" T2 x7 L2 S# A7 i5 Y: _; K
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" i3 N( A; x0 n# j) w
% w9 ~* U, a' ~3 @4 G
另外一个小建议,就是move,所有的move都可以这样
9 {" o$ g! H) `; w8 B5 A! w8 A8 X9 nif not move() then debug end! h# J- K- P/ @: q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 _- T# Z+ |& a" ]6 s. _
plant simulation中的free libraries有AGV模板,
9 B: c0 j' e' x' t1 N里面也有案例。/ g5 f; [% C9 z* ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ d" V2 s& k# g7 M( O3 b1 ]* T4 v
& R  T6 ]1 J4 `. R2 F8 f( h
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : N$ ^* Z9 l- Q8 C6 {5 R

7 X* V( d; F, t那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) n" t9 M8 j5 Y5 m% Q* @
这是AGV_putin中arrive的method。
$ r9 w! S. s* z
6 o) A: @* x6 _当到达物料速度越高时,这个报警更多,
8 Q) x) q' {' I$ O/ }9 k! N7 J2 ?3 x: ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-13 11:44 , Processed in 0.023675 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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