设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8923|回复: 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'
8 }: b' C) M" H8 m*/
& f# O& i8 c  L) i" L3 j% N' T: X$ i% q: gis9 q7 |! N& i& w) M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 J" j/ y" F- m7 A" q3 u. i2 pdo* C# o3 |: j4 F3 [, M7 k
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 l  j/ B& }) ?% u9 ]7 [        if current = @.Destination -- else return
. h0 ~$ K( a& ?& t+ j        then
: i+ g: h& I# ~1 B& O( A                @.Destination := void;
5 D5 U+ D( _1 K0 M                if @.occupied then- ^# ^0 C: n1 d( P+ F
                        part := @.cont;
6 x" ^6 c) [$ o# H/ V3 N6 L                        @.transpOrder := void;
( j3 T. ~5 P8 E                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 {' X( A) j. Q3 b+ p
                                @,root.eventcontroller.simTime);
* Y0 \/ r8 q' X6 ]) H                        @.HasOrder := false;% m9 b1 E7 A6 Q  C) i
                        @.DrivingHome := true;
$ X* h/ K- B# ]8 P: i+ v                        rgManager.tryToStartTransOrder;2 A% B4 ~* B" _& Y! ]' K* q
                        if @.Destination = void
! ^+ S; E0 ?% K/ N                        then -- no transport order for vehicle @1 Y5 M0 u7 @4 N2 l6 D! f6 V
                                @.Destination :=1 I5 m9 R" X5 [8 X/ O1 t1 w
                                rgManager.nearestFreeStation(@,track.~);
! G8 }9 N5 [: \3 k$ {( d                                newDirection(@);   3 ]) ^/ B  p( a6 f7 \8 c
                                if @.Destination /= void then, R5 ^, t$ j3 t6 \9 i1 b0 u0 ^
                                        @.Destination.NumReservation :=
  J) o. G( R# \) N; I3 t                                        @.Destination.NumReservation + 1;' T- M" N4 v, `9 |' b# S2 }
                                end;
& S& `: p# Q3 I4 |4 t                                @.CurrIcon := "drivingHome";* G% s( i6 R% r
                                @.DrivingHome := true;
: T  V  M: V- I& ?4 c9 Q! g6 Q/ {                        end;+ [. M' U, {" u  s7 Y4 v
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 L0 n2 }8 W1 I9 f/ M9 P3 t+ \                        part := @.transpOrder;
/ ^# J3 l6 m0 y7 w1 B5 A4 c7 i- [                        part.move(@);-- load part, V: e& U! [1 Q9 {$ g
                        @.CurrIcon := "load";  o8 p9 V1 {' y+ T# ?! L% o  r& L% V7 n
                        GlobalDistObj := part.globDestination;: f. L5 T/ a2 a% e: o6 Z
                        assignLObj := rgmanager.rgAssignL;
" d# H0 S7 R1 A5 i  P                        row := assignLObj.getRowNo(GlobalDistObj);
6 A3 C$ G  a9 x! w3 [+ K                        if Row = -1 then -- since 70& E8 t) }; b% t
                                if lan=1 then
) z) Q$ h0 O! x. k! f, W% p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. J# v5 m9 U# L$ |$ [2 \- s; d: v                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 o$ e7 ?/ ]" V, x8 ^7 c0 g# j
                                else5 F# e1 k# L  ~* V3 [' c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 c9 L" k! i7 H: j5 t3 @8 P- }0 s
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 d# p& o3 s/ w. t# V7 B                                end;
) U! V8 B4 T- X1 R! }$ K                        else% e9 w; O# u8 f& h  F8 `
                                @.Destination := assignLObj[1,row];. E: D3 b- F, x' {
                        end;                       
% q3 G, n  h9 ~' G+ c                        newDirection(@);
: q& ]* }7 S, ~6 j! m8 n                        @.HasOrder := true;
2 Q  T+ i: \7 h  G& k$ K                end;
7 J: m$ V" l# a! ~* m6 b' O        end;2 K$ a. U0 F1 n) {, I
end;        -- of the method
3 {) \/ |$ Z& j# k! @8 M4 t: |
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" }, B1 M4 z6 V7 O( c2 q: O# S) B- i0 b7 t# R, }( ^5 M. P
这是AGV_putin中arrive的method。; @3 U! u4 l- \( r

5 c1 c* M3 W# ]3 Y/ U* Z当到达物料速度越高时,这个报警更多,- o5 _# v7 n0 M6 M0 j+ G
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 T; I: _" |; Q% z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( H6 t: g4 ?8 a. C/ l* g; X. z  W3 G0 s9 }# G
另外一个小建议,就是move,所有的move都可以这样
. @' n) o# c# Q2 h2 o" }% xif not move() then debug end! n0 c( P9 n' b8 r
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  j. e' ?" a* x/ j4 r" `" Q
plant simulation中的free libraries有AGV模板,$ @* Q  v1 M) Y: t
里面也有案例。
8 W- J7 V7 A, t3 D: w* }我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* n8 v/ O8 k7 }" q. K2 W6 {

$ w! W/ h  K; Z# K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# W2 B. M% p, r" b
( z4 E  C& F) \那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * y$ M- A2 p: E2 g2 C
这是AGV_putin中arrive的method。
* p6 q+ Q5 i1 q( n4 R3 i! d3 M  e9 c3 J
当到达物料速度越高时,这个报警更多,

; @/ E6 f  Z, ]: c. X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-4 13:30 , Processed in 0.015494 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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