设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7479|回复: 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; i% p9 A3 N! R! u! @
*/
- ?; O" j# k8 g' Iis3 T3 E  M: N0 W3 f( n
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, j. R4 U2 j9 @2 m, qdo; p/ _. P( s5 h5 u+ f- J- ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Y9 z, U' O8 D* T        if current = @.Destination -- else return' R) U: [* {0 K% t( K
        then. T2 Z4 K2 b+ F, j9 _
                @.Destination := void;- C$ H7 q4 C8 o  |2 u
                if @.occupied then
1 i$ o& B. N) p' G                        part := @.cont;
4 M4 \- O+ N1 f$ ]                        @.transpOrder := void;
# `: @% L- ]3 c# E                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 g. I; d# d. a0 I2 F+ A! S% B                                @,root.eventcontroller.simTime);
& p) [0 I5 a+ I9 g6 J4 D                        @.HasOrder := false;% r! o* j# ]+ F9 u+ |
                        @.DrivingHome := true;
) D3 x9 c& m1 @! Z0 W" ?# _                        rgManager.tryToStartTransOrder;! K- W7 \! S5 ~8 ^& G7 {" ~1 z/ ]
                        if @.Destination = void
# R: X& r8 ?2 l8 _5 I- L                        then -- no transport order for vehicle @/ K! K* n/ k, R2 m* U- [
                                @.Destination :=& x: ~& ^# F4 a/ F
                                rgManager.nearestFreeStation(@,track.~);# V  f. J9 S4 V" G+ X9 s. `
                                newDirection(@);   8 w2 f0 \. B+ q9 L* Y# l% j
                                if @.Destination /= void then* Q1 x# n, Z+ L: L+ D3 B1 m
                                        @.Destination.NumReservation :=
4 ]9 x/ G; U1 G: {% N' b                                        @.Destination.NumReservation + 1;8 i- W8 e1 c3 M$ S
                                end;+ m5 I' }) z  w4 w6 ~
                                @.CurrIcon := "drivingHome";
+ u( U' D- \! a7 \                                @.DrivingHome := true;8 P4 @6 D! q8 k3 o- ]( g" {( f& K* k
                        end;6 A! f/ s# e/ ~* `9 _5 v
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ~& E8 C6 s1 L  J% l0 j                        part := @.transpOrder;2 T+ C  P+ r! r( I
                        part.move(@);-- load part- p/ u/ S4 g9 B! J+ G! E! I
                        @.CurrIcon := "load";  W% j9 D# \- m7 J! A1 g
                        GlobalDistObj := part.globDestination;
" p- p# s1 h7 h( f, E                        assignLObj := rgmanager.rgAssignL;  e: h7 [5 q' E
                        row := assignLObj.getRowNo(GlobalDistObj);: Z. o7 }* w! a- g0 l
                        if Row = -1 then -- since 70
- P, u) H, C- `/ K( H5 i$ \6 p3 }                                if lan=1 then
' g! J- x: z: {- C0 l( E  U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 X. Q* \/ P: B  o3 ^7 l3 n                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ C+ p9 m: h" Q) a+ F3 e
                                else/ ^8 s0 W% U4 M9 M& B: t, |$ ~, `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 o) v0 P( W. Z/ D  C                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 c  \' _7 T8 s1 p* d0 l0 D: i                                end;
6 a* _0 y" h, t+ V                        else3 L  `& U; K$ I5 S3 T
                                @.Destination := assignLObj[1,row];
. \6 }. T3 M! U; F4 z/ i" n$ L+ M                        end;                        9 @8 K0 B# o% f# T7 U5 z
                        newDirection(@);/ z+ b$ K/ b+ x# M# r( F" \
                        @.HasOrder := true;
6 s& G2 R/ X! B  q" b  \( W. ?                end;
$ I) A/ ?! i' R% v        end;$ e. H; f0 N& v
end;        -- of the method% x; [$ o3 f' k5 p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
) P$ b  m8 O8 Z' q* r
' T3 i" w. Q7 O3 d, Z这是AGV_putin中arrive的method。' o5 |" `' P; P  ]$ Z6 Y

/ n+ n7 y" s" S! f) H- W# Z$ P" E当到达物料速度越高时,这个报警更多,
9 \- i/ t  P. p  u' p4 f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: U9 k8 r& _  h; O程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& O0 ]! b) B( O) i: d) x5 M: e+ Q# z0 f$ o

5 U& a$ L. m; S另外一个小建议,就是move,所有的move都可以这样
. E+ Z# l! K+ Q: hif not move() then debug end
' B/ ^2 y8 i- d# A这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. J; I8 _% z8 s" N  P* ]plant simulation中的free libraries有AGV模板,
4 N( N' p" v( i里面也有案例。- a/ [+ a, W# \% r
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# J% i: O+ ]- k6 t

  a1 x* j3 O, ^+ L1 A  a# W. R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. {; d7 k0 N  ~+ }+ X
; R  [5 N' {) i那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 u1 z$ M; [' S/ i
这是AGV_putin中arrive的method。* L8 [0 d2 @/ D( p, q4 X

3 T8 b! O4 x* a5 Y' L3 A  o  ~当到达物料速度越高时,这个报警更多,
! ]: {7 }1 Z) ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-13 20:16 , Processed in 0.020716 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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