设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6605|回复: 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'
9 J8 @2 _/ x3 Q- y3 R% F/ N*/
5 ?/ C9 P. V4 T8 P5 cis
' A3 e, f) q/ G& G* G' e  O9 l        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) k3 b) ~- L, k+ d. M# O
do* B) {, y# T; g5 v; K+ f
        Lan := rootfolder.Internal.Tools.AOLlanguage;
, c  Z/ [9 r) s        if current = @.Destination -- else return
# I/ y. N. H/ m  k) _+ t        then+ b1 L8 G; H" A
                @.Destination := void;# V2 ]1 P3 T- t0 a& J5 a
                if @.occupied then
' X! A2 V" t: R; y                        part := @.cont;6 |4 U8 Y4 G( v
                        @.transpOrder := void;3 b% w, i1 J% Q% m1 t3 N
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! O6 G9 D; W% j: H$ w8 _                                @,root.eventcontroller.simTime);2 \6 Z. N4 t" O. m8 T
                        @.HasOrder := false;
& h& W- a* v, b                        @.DrivingHome := true;' ~) M; ^3 j' J! ~( Q' a
                        rgManager.tryToStartTransOrder;/ I$ `( q# z+ Y+ x) Q$ p( S
                        if @.Destination = void
' S- T! L& S% Y5 }- s% {; C                        then -- no transport order for vehicle @6 l, X0 L$ a2 m6 p# f) P/ Q
                                @.Destination :=
' K: B7 \0 H& A" p/ T                                rgManager.nearestFreeStation(@,track.~);. A! E6 U, y. o+ V, }
                                newDirection(@);   
: A. a0 B+ T* c                                if @.Destination /= void then! _/ R+ `6 F! O- s
                                        @.Destination.NumReservation :=
6 ~- G) c3 N; C4 L* ]                                        @.Destination.NumReservation + 1;8 t  R+ V7 L: s7 _# l2 _, [
                                end;* E) k6 e$ A9 N/ c
                                @.CurrIcon := "drivingHome";
* z, I$ [% V0 [' x( }8 l                                @.DrivingHome := true;. a7 r+ t# C' i7 u
                        end;! x; m) n9 S$ D5 {3 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: I/ A+ d& g! w5 G, `7 T
                        part := @.transpOrder;
4 \  h0 x- Q& |, ~! E- p- I6 q                        part.move(@);-- load part
7 k  P" t: N- B" j7 C" }( q                        @.CurrIcon := "load";. e8 s$ r6 I6 |  s* W5 d
                        GlobalDistObj := part.globDestination;
. w* X4 H4 i1 m                        assignLObj := rgmanager.rgAssignL;& h. Q$ b* s! w
                        row := assignLObj.getRowNo(GlobalDistObj);. ^1 _& i1 w8 _3 h$ {
                        if Row = -1 then -- since 709 c; U5 ?3 e& M1 F
                                if lan=1 then9 u+ n& [5 ]  \; V
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 D, r7 y6 Z- T  f! d, ^+ k. ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));9 v7 m( a$ ~2 n" U
                                else/ m3 d7 j9 S0 j" J8 K+ U1 z# D) F" F
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 T' O8 ^2 [/ O! ^. }; z, L- D9 y                                                to_str("in docking station: \"",?.~.name,"\""));                               
' X0 y# |2 c! I0 g: K) G$ _                                end;
) F' y  n# ]* i% c# h% @8 ~8 t; }: P                        else' r2 l9 H, B. [) v5 U5 O" }
                                @.Destination := assignLObj[1,row];
# `% f" R- r6 D+ v/ y' `3 D5 \                        end;                        $ N2 I$ m7 g) H. e: P% q, y
                        newDirection(@);
6 J. [- Y0 Y% D! a1 ^                        @.HasOrder := true;) W; H8 ~( u; i
                end;; b" P% {8 }8 L5 o: }
        end;
5 o# F; @, \, B) O+ Nend;        -- of the method
0 [5 ^. i& C# Q# B; s" |, e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . w3 }7 y: ]  Z7 ?
. m2 T% B6 L) V9 I9 C( Y
这是AGV_putin中arrive的method。
0 X9 o: b5 G0 q
  w8 a) U' V# W% x3 a当到达物料速度越高时,这个报警更多,
# ~2 v) z/ k$ o  u! t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# Y2 R, ~' x% ~程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  X" I& J3 ]9 W5 ~" d
- P9 O4 I% R5 _$ Z3 w3 O
另外一个小建议,就是move,所有的move都可以这样) p! S4 T$ B/ a
if not move() then debug end
, R* R: k- h7 V' {5 I! A7 K$ P这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 h" E9 q) D2 [3 y4 m+ ]plant simulation中的free libraries有AGV模板,# a% F6 y7 D* p
里面也有案例。
  |2 k/ ]* `  n$ H3 C( o我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: b" ?6 m  J7 c) Y3 j

0 P/ k* E, t& |2 q! i0 ]我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 t6 o: _! P. Z) q+ }1 t4 r8 I5 e% h, K
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) U6 o- k( z8 E
这是AGV_putin中arrive的method。" l8 A/ Q2 j! t+ `. K

+ V  Z# H  z8 B6 U$ O% P当到达物料速度越高时,这个报警更多,
  U/ N6 t, T) ~9 a( ~
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-15 22:12 , Processed in 0.019185 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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