设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7284|回复: 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'  \+ Z' L6 o7 O5 l
*/
. D, d) P( S: j) }0 Nis
! O0 [( T/ m) Q% x* C1 j5 W        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" F% T# Z' p0 s3 K* Zdo
$ R3 ~! q4 K1 H% L. A) j/ s! q        Lan := rootfolder.Internal.Tools.AOLlanguage;8 G9 N$ M# M; V+ _
        if current = @.Destination -- else return
: J1 F) u7 ?3 D9 s. Z, |& ?) n2 ~' [        then3 E( ]* |4 M" @/ u' k
                @.Destination := void;
; R% M5 c# z* N3 r0 F                if @.occupied then! _1 c: g+ E/ p
                        part := @.cont;
' y) J6 p7 }/ z- {0 `6 }3 V2 U. b                        @.transpOrder := void;
" z- f4 b2 ^6 L6 d( T' j                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 X, M7 e( g4 Z' _5 V
                                @,root.eventcontroller.simTime);
; G! H% j/ {, ]" S                        @.HasOrder := false;: F" ]" n" ]/ ?8 }
                        @.DrivingHome := true;5 Y' M0 Z2 ?; q& O: |
                        rgManager.tryToStartTransOrder;8 w* ]9 t$ I5 i. a
                        if @.Destination = void
+ ^9 W6 Y5 s4 O3 O4 q) a                        then -- no transport order for vehicle @
  G6 ~& ~/ M& Y, ^+ N                                @.Destination :=9 q/ E! k( N+ E* R$ J2 Y
                                rgManager.nearestFreeStation(@,track.~);
4 N) |! B" ]- F3 n* W( u                                newDirection(@);   ( Q/ J$ A- t: X
                                if @.Destination /= void then
- ]/ {6 n3 i7 D. A* U1 C( c                                        @.Destination.NumReservation :=. f7 z0 s* i/ {* G' n6 |: D
                                        @.Destination.NumReservation + 1;0 S# T, z7 a  D/ K
                                end;% N8 p. z, f  \4 x+ N9 j( R5 [
                                @.CurrIcon := "drivingHome";
/ L" l2 E3 s2 |; E2 P0 H                                @.DrivingHome := true;! Z& k7 n" G9 q
                        end;9 Q. _- S1 H; I4 e+ ]+ w" }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( h6 H! b8 y5 H! N# U                        part := @.transpOrder;% b8 M4 k3 F$ g* X
                        part.move(@);-- load part1 i' f2 S: \" v9 t2 W& }+ m
                        @.CurrIcon := "load";
$ {+ x2 V# s+ L: ]) O: A7 d                        GlobalDistObj := part.globDestination;
; A- E% |. k1 U. _2 X2 u0 Q                        assignLObj := rgmanager.rgAssignL;
2 |! l( k* d. D/ f2 p6 C                        row := assignLObj.getRowNo(GlobalDistObj);  Q& q: F% e; |6 T* j$ x
                        if Row = -1 then -- since 70; ^' z! T! i( J& _
                                if lan=1 then1 a5 W4 i5 C' A% X$ T0 G) c% M3 Y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# }8 z3 h* w/ F/ p% d( L- \5 x) |                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 r3 q& i7 v! h) h- N5 W4 @                                else- _9 d3 a+ D, ]& j& J. g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) X( T+ S$ \0 v; ?
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 i2 S* Z4 s' J' W( D
                                end;, M* N" p) }9 F/ [6 P: \
                        else7 `& `+ G8 N( W4 U- {& D4 ~
                                @.Destination := assignLObj[1,row];
- x2 H( K) P" Y8 v6 X9 N                        end;                       
  K+ [$ o! `4 a  g0 P2 n                        newDirection(@);8 t1 `) P# b7 P8 M
                        @.HasOrder := true;
) W. @; J$ R$ V                end;
; Y( A6 Y$ G' c" t        end;# n* ~5 a' Q7 C, Z' {9 m
end;        -- of the method9 F& u6 N- b: l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
0 H2 T0 q' I; Z- P# U+ q5 A5 T# _! d" Y$ y) ?
这是AGV_putin中arrive的method。
5 A1 _+ e/ ^) {4 z; F& a. f# T+ ], L" B) E
当到达物料速度越高时,这个报警更多,6 q* ~9 |/ Q% [& b  C% ]
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# x7 p0 k5 v, f1 h" X* H程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 g4 }3 @8 F  J7 n8 M
  ]6 T$ g4 d$ B8 V; }! }& U+ N9 x
另外一个小建议,就是move,所有的move都可以这样
, i1 P9 c/ ~5 K* s7 lif not move() then debug end
  y- ], k# z% ~3 ~这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* z5 j; d& Q! q! \6 d( G1 I: o5 @- ?  Vplant simulation中的free libraries有AGV模板,
  k6 Q* F8 M1 d. q% O里面也有案例。5 Q& C* i2 I3 e8 M& L8 o
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: F$ O' F3 }3 j; R$ W2 L$ Z" |4 p  Y7 [( o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. Q+ k  ^- o, B0 U7 T
- ]- m: x' D: q; ?5 b: S那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 |4 f8 Q5 {: T2 ?. ^2 o
这是AGV_putin中arrive的method。
, X4 g: C$ [( \* z/ H8 ]3 h' X: n$ A0 u* t7 a
当到达物料速度越高时,这个报警更多,
( F2 _  V8 ~- c& ?$ d# L$ w
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-1 20:44 , Processed in 0.019298 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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