设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9022|回复: 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'
) W  Q0 ?$ F: p$ K*/- u' s. D$ \6 N0 a' T" |# o3 _6 G
is, T0 G7 S! J7 O
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ E( X. i- w  h( `do% A, _& L7 S3 T% v3 S* Q; x+ t, f
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ P& i. J  N3 V* u1 |& m
        if current = @.Destination -- else return' B" t; d: K. a& o( s4 A3 {
        then
7 G+ @% V! C* H5 E9 m  `                @.Destination := void;+ V! u& Q! J  \: N3 g( e- m
                if @.occupied then. a) [( A1 Q% T/ G; ^8 p% d* \
                        part := @.cont;, R* E2 ^; h4 D+ o6 ^: q
                        @.transpOrder := void;
8 Y/ d! Z+ z/ w2 k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 e) ?8 X! S$ u# i; M. k9 {$ ^0 {                                @,root.eventcontroller.simTime);
" I9 q  }) L# L7 Z: |                        @.HasOrder := false;
" F- U. `# o% c" ?$ u4 ^                        @.DrivingHome := true;
$ l- D  Z7 r' Z- V5 t' Q8 t* D                        rgManager.tryToStartTransOrder;
9 {. ^2 V+ m) G                        if @.Destination = void1 w8 I4 K8 z  h# G$ c& S
                        then -- no transport order for vehicle @0 |' f3 ]) |3 V4 C! N' v5 C! v
                                @.Destination :=% Y9 ~5 k& {1 s
                                rgManager.nearestFreeStation(@,track.~);
* A* @- A. U, n7 M" {& q' Y" H                                newDirection(@);   # I$ O+ D6 M( ~2 ]5 p
                                if @.Destination /= void then
: E0 S2 l1 @9 u                                        @.Destination.NumReservation :=
' H9 u- o1 [5 d- _+ T% Z1 E                                        @.Destination.NumReservation + 1;9 n  p" O. S2 ^/ y. g: W7 b" V& h2 P
                                end;
: }  Y6 J% T/ s6 J% c4 Z                                @.CurrIcon := "drivingHome";# q( F' _, r# Q' \
                                @.DrivingHome := true;
! V0 k8 R) S9 m- `0 X7 B/ B% L                        end;1 T& J7 p9 m6 u7 ?# }: E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' z4 K' o8 q: u8 g
                        part := @.transpOrder;
* P' R  e7 O0 m* g                        part.move(@);-- load part
' `) X" Q. z7 H" Q7 r                        @.CurrIcon := "load";
$ R/ H/ F* @; z, W& K1 t* P                        GlobalDistObj := part.globDestination;0 n1 B. E& P  x4 y9 K/ e' n2 Z
                        assignLObj := rgmanager.rgAssignL;7 o3 s: a  U0 e9 R4 ?
                        row := assignLObj.getRowNo(GlobalDistObj);
8 O8 c% q. G6 A. t* s                        if Row = -1 then -- since 70
0 |2 m: w: N! c. g/ P                                if lan=1 then
$ ~9 ]/ j$ Z+ K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 \5 q. m( @. h! m* |: V) _4 h                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ ^* w2 }/ @7 Q5 P% W
                                else5 W. u3 v! g2 X2 R" a
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 k4 X0 R/ |2 {. V% b
                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ \# s6 j0 C2 P; @                                end;/ l, F4 `; x1 }. W
                        else& I$ U! A" T# y/ p
                                @.Destination := assignLObj[1,row];
" T  _- m7 @# m2 b9 J                        end;                       
+ |4 M5 `" I7 K. ]% l. g0 L6 Q                        newDirection(@);
5 q. A8 C8 E* L; M2 q                        @.HasOrder := true;0 u: E, I& j  D4 R
                end;# T0 h) }2 W4 @: }+ g) m0 w
        end;
+ T  k4 E: e& W+ I5 Iend;        -- of the method
& ~4 ]9 {9 N: z6 K' a5 p* T" T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: q8 G5 V0 D# p$ [7 V, m# ~# C$ I5 ^+ g8 w
这是AGV_putin中arrive的method。) t/ E; L9 I9 X& V

; V0 j: g, |7 V8 m当到达物料速度越高时,这个报警更多,
  R1 B8 l: _$ m7 M可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
, L/ Z4 |1 }$ b  A7 j9 x1 |# z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 L& H# a6 T' N. s, ^
5 w$ A; `1 L8 `4 T0 q
另外一个小建议,就是move,所有的move都可以这样
5 \! K" L$ g: o" _if not move() then debug end/ O0 y  g2 l6 [  T# y+ r) Y7 A& p
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  A0 J; ]0 M3 Q
plant simulation中的free libraries有AGV模板,
% w6 U- i2 Y6 X7 e* z% O/ P里面也有案例。% L# Y- \( J3 y" d$ m
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' [3 h8 O) U2 \4 s) r5 I
3 `  L* v  A6 i' {9 Y" ]我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 % k/ Y! I" U. d  |
0 V5 j, p9 {3 Y" U0 O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- W$ k8 I& J, j" b这是AGV_putin中arrive的method。
% S  e% {5 W8 m$ a2 `' F% y" e; n' w5 L$ P2 y/ z1 p
当到达物料速度越高时,这个报警更多,
" k; @3 A7 ~- b% F
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-9 14:23 , Processed in 0.018122 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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