设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10014|回复: 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': f; ?. b4 P9 ^
*/
  S/ L- v2 \4 l  B, his
7 l7 H% j9 b& w& c% F  c        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ @7 A2 o0 |! _0 |
do8 u$ `6 b, s8 }; Z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' t. M4 {* ?. \% A; [" l8 {2 X* Q        if current = @.Destination -- else return
- Q+ Z3 I( Y+ T; D8 ^        then
. B1 w! T6 i. Z# S+ l                @.Destination := void;
5 }2 W: G+ \* V5 y/ d# x7 o                if @.occupied then5 p, b5 k$ w+ [3 Q. P
                        part := @.cont;& [9 `" g2 o9 d- Y7 Z
                        @.transpOrder := void;
7 T( J. P$ d1 F6 W' n- ]+ k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% y) e+ G. p' {# h+ d                                @,root.eventcontroller.simTime);) ~5 M& m+ h2 x8 \8 f
                        @.HasOrder := false;/ g% _. t1 J7 A6 A' G$ d* L7 q" O  a
                        @.DrivingHome := true;
  _. @* k5 c2 c3 V6 y4 L                        rgManager.tryToStartTransOrder;
- X* U6 G3 v: p9 m                        if @.Destination = void
5 |0 H# i: f7 q5 J                        then -- no transport order for vehicle @2 i3 j' A5 X- y4 w( \" v
                                @.Destination :=2 B$ e8 f- ]# a1 H+ q5 c+ X
                                rgManager.nearestFreeStation(@,track.~);7 _, j1 p0 V7 }$ D! B& W5 C
                                newDirection(@);   - A; y% K& t8 h$ X% d! z. j
                                if @.Destination /= void then
, L; H: }8 h  W* c+ t                                        @.Destination.NumReservation :=. u- C6 p* H4 A7 ~# x
                                        @.Destination.NumReservation + 1;9 d( l3 T4 X. D9 E5 d8 M
                                end;) R( i* b/ \. c# p  m
                                @.CurrIcon := "drivingHome";* r! \) |. @$ q! B7 f% u
                                @.DrivingHome := true;
; a% Y- U; Y8 q# [# M                        end;7 i- e8 Q- W9 T( _
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
  E& \6 M( z. r3 ?6 T# }                        part := @.transpOrder;! t/ c6 ]" ?  q9 i0 R
                        part.move(@);-- load part( N3 |+ Z- C3 ~
                        @.CurrIcon := "load";7 E2 S# e4 Y, r4 h) [% T* u7 ]
                        GlobalDistObj := part.globDestination;
1 Y& j( z. q1 Q- x                        assignLObj := rgmanager.rgAssignL;
( T" j/ e& t  e6 y                        row := assignLObj.getRowNo(GlobalDistObj);
8 |7 b% W% W+ n/ _+ E6 q                        if Row = -1 then -- since 700 m; H/ |4 T1 H, y0 s: r5 H
                                if lan=1 then* a4 R1 D) N# `. }6 S% V7 ]
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 \' A; |" i+ u+ G+ D' B% Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));( p: p( o2 ^! N5 Y8 U7 f5 E
                                else! a5 Q& e* L4 y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! c- U6 {3 m2 p                                                to_str("in docking station: \"",?.~.name,"\""));                                ( ?$ c/ M: B% C9 r; o0 d
                                end;
, X1 ]: H' B$ g                        else8 I9 H# b$ a8 w' M- v
                                @.Destination := assignLObj[1,row];
+ C2 D7 z' P6 c2 @1 u" \$ _4 {% s4 \                        end;                        1 A4 b9 \4 w2 _, _" S7 c, o: n, Z
                        newDirection(@);
- r7 N( {6 f; @! L                        @.HasOrder := true;& U- g( J1 u+ w$ h8 W
                end;
- ?9 E! U9 k2 v8 S. _8 [: G        end;
, N% O; _3 _$ k  v# g6 yend;        -- of the method
5 }. N5 R4 c" A! I% |8 a8 p1 j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * A0 d& |' O  b

. r- a: _. ~$ g% Z8 B% j这是AGV_putin中arrive的method。  C2 \( S& D$ t$ O* b

5 Y$ T6 v$ }6 B7 o# l当到达物料速度越高时,这个报警更多,9 w1 z9 K0 M7 C. b; d! d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 k# m; f$ Y& C4 a程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 E# w) j* v( k  r# j
7 }" b! r! U' g$ d& z/ U6 {0 D3 _0 G另外一个小建议,就是move,所有的move都可以这样
( _  u) c% g6 j' T' tif not move() then debug end
5 f4 u7 w9 W* W0 ?) @这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ e2 Q6 P4 t: a8 s0 ]( K8 K
plant simulation中的free libraries有AGV模板,
$ f$ m' ~$ n9 K# ^% w6 a7 W9 b0 k里面也有案例。
0 t/ W1 z' F! m2 k" }( F. p我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  Y3 s% z) o. O% r
6 V& l. X7 H- H: s) b4 `! u9 t. E
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  B0 y: d  ~$ P
5 p, |* a' g) L4 m# p" q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) L0 G7 p% z6 A( m
这是AGV_putin中arrive的method。( W0 i; z! P' A5 M3 ^' l

/ f: E! y- L9 c! n当到达物料速度越高时,这个报警更多,

0 `1 l6 o, R7 j  Y- @" @另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-7 13:20 , Processed in 0.023998 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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