设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9479|回复: 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'' N! `, g: R0 q
*/
& a2 f2 R% I4 dis! X' C2 w( X% ~! j$ y7 r0 A( h, }0 h3 s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 h/ i/ E7 w9 z* ?5 O
do
& O2 u0 V% p9 v. Q2 ]% ?8 s8 G0 y        Lan := rootfolder.Internal.Tools.AOLlanguage;" h, C" B/ F9 p5 C* \
        if current = @.Destination -- else return; b3 ^& q# e! M: m  B
        then3 T7 }0 Z8 s: u' ?9 P
                @.Destination := void;
* [3 _6 r0 X3 T# I' h                if @.occupied then5 [$ g1 ]7 P2 W0 K  s
                        part := @.cont;
/ B7 ^7 n/ o( I; W3 L- \& V                        @.transpOrder := void;
0 a+ W" F$ X" z; t% H. o                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. D8 n( }3 S9 p8 U+ L- F
                                @,root.eventcontroller.simTime);5 e  b  ?" X9 F2 g; o: V
                        @.HasOrder := false;
: ~! u8 \" m0 ]. t( y! w, z                        @.DrivingHome := true;" K7 ?0 I! m* M4 Z0 I/ T' J
                        rgManager.tryToStartTransOrder;  J7 s' X: r! C5 m
                        if @.Destination = void
" k) w) T: P, f& j7 m0 F9 C                        then -- no transport order for vehicle @% P9 ?0 F2 M* w* ?! |5 y
                                @.Destination :=
7 q2 q+ Y, L) d% u) |& {                                rgManager.nearestFreeStation(@,track.~);
/ Y: G2 w2 t  ^                                newDirection(@);   
$ v+ w0 V- n- [& K. J% j                                if @.Destination /= void then
* h8 w, Z! g, o                                        @.Destination.NumReservation :=
4 I/ I6 g9 G& Y9 B0 r) F$ i                                        @.Destination.NumReservation + 1;
& ~' l6 F! P$ ]' {2 ~: Y- S: o                                end;& |, A* o* u, c9 q1 _4 n0 P+ a
                                @.CurrIcon := "drivingHome";+ k6 j3 m( Y( a1 L7 ~
                                @.DrivingHome := true;
6 U0 H4 z, q& m" r1 l0 ?                        end;
2 K0 z7 V* I: n. c3 {5 g/ |/ |# l$ v7 S                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ u( C/ V6 c7 x7 H                        part := @.transpOrder;# p0 n! P6 K/ H
                        part.move(@);-- load part
; a0 V/ |, }# M. D2 L                        @.CurrIcon := "load";% x/ Y$ {: Q: c. C0 B/ R3 z5 C* V! r
                        GlobalDistObj := part.globDestination;  ?1 j  S. y- ^. T
                        assignLObj := rgmanager.rgAssignL;7 ?$ j/ l$ H. d, U
                        row := assignLObj.getRowNo(GlobalDistObj);6 h2 k; e7 y( {
                        if Row = -1 then -- since 70
2 R, m$ v+ V$ c* j2 i% n  e                                if lan=1 then
. U$ @7 m: D4 B2 N! |3 U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* D0 X4 p6 Z: q( s; L. t! A% S
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
. X2 T' v2 Y0 B  t                                else3 A+ l( Y! S' t& b
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  f9 u% W) ?& Y9 I7 j" O* \
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) n2 J) s6 `' Y# M, t5 F  Q2 p" ~
                                end;
; C( {. f( ?& T% j4 d/ t                        else. k0 w1 i; T0 K' d# D3 [
                                @.Destination := assignLObj[1,row];4 J$ W" c; [* k# g! Q; a2 \; F3 |
                        end;                        * b, y2 d- g3 S! b
                        newDirection(@);
. d) I) G  v3 l2 b0 N                        @.HasOrder := true;& v- x' l7 p$ M& f
                end;
8 t" q3 n* B" u2 p: n        end;) b, ]7 e$ V' B
end;        -- of the method
: O3 F. w9 S- z! {  ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : E9 G9 f) q3 u, @( c- b
2 e1 w9 E3 j$ k. F8 {0 ~! w) y
这是AGV_putin中arrive的method。
1 A& o; I) U( j. ^, v% ^
2 K# K7 K" R$ d4 N% i2 ]( Z当到达物料速度越高时,这个报警更多,
' s' ~$ U; j2 u4 H, r可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) B% _9 e4 y3 J7 C
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ `3 h: B! J9 D5 I

$ f6 B2 @7 \/ r3 i$ e* d, l* S) }, ^; [另外一个小建议,就是move,所有的move都可以这样) ]5 Y9 ?: O2 B+ ^0 s# G) F1 z
if not move() then debug end
8 d) v" G0 A, S这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; N/ c5 M1 M4 ?: Nplant simulation中的free libraries有AGV模板,
3 f7 e' Y) y% c0 @里面也有案例。* ~% p1 c7 \$ `1 v( O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 B( V! U+ l& P  p; _# Y+ j1 p& {; q- G& e
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ k. j8 T! I; c: h8 S3 K! r& h% ^* n& y. _. i) e
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; l# ^+ {3 N9 \5 Q& a, t. U这是AGV_putin中arrive的method。4 L+ W4 D5 I6 S( G0 u
1 Z7 Q" Q0 K" c& L3 j1 _
当到达物料速度越高时,这个报警更多,

" h9 u. Z( k( G另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-3 09:08 , Processed in 0.022913 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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