设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6708|回复: 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'4 n& Q( ^- D& f0 p: o) N
*/
& w1 t" ?& W4 _6 X' lis3 x, h8 X. {8 e0 `) a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) n& u. H9 D, N0 g
do5 m7 W$ Z3 I1 s6 l; |( I
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 z9 |' [: N! |5 m1 q        if current = @.Destination -- else return
' Q% o# u" \, I: Y9 l. a. k        then
$ D. M% ~- V6 W! {                @.Destination := void;
. M: }7 `7 L* x# z% @; w. U                if @.occupied then0 C2 |2 X$ Y5 r8 d* `$ \
                        part := @.cont;3 X' J% q) J* n1 \8 O
                        @.transpOrder := void;) W" O, T6 v& C4 J
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( C2 B) [3 q# F% Y4 r) r  L+ e9 y                                @,root.eventcontroller.simTime);
8 b) |7 N  |( C2 b0 X- v                        @.HasOrder := false;/ _+ t! W/ M# S) F
                        @.DrivingHome := true;
6 d7 X. R* ]* ^# ?                        rgManager.tryToStartTransOrder;
$ J4 X0 x" v2 [0 W                        if @.Destination = void
( q8 B* ~! r1 j* l8 o5 k1 @( o: L                        then -- no transport order for vehicle @
* A1 @- g8 U" F, L4 A                                @.Destination :=  h! K7 d; q2 F6 g8 g9 b. w) o
                                rgManager.nearestFreeStation(@,track.~);1 h& b& ^) h: o$ Z. b) N
                                newDirection(@);   6 A# h) O7 r3 Q% i6 W, B
                                if @.Destination /= void then
: ]) j2 f- G& a* E                                        @.Destination.NumReservation :=
, _2 L; o# t5 [9 {                                        @.Destination.NumReservation + 1;, R9 A' F, B( K' s
                                end;8 |! O/ N' ?2 E  B( D# ^4 x
                                @.CurrIcon := "drivingHome";: o7 v& Q2 e6 n% B$ w6 i  w+ {# P
                                @.DrivingHome := true;, y% A% V3 `! y- r1 J* l) b
                        end;
2 L6 P; p) \2 x2 E8 S: O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 i- f. ]. q+ p
                        part := @.transpOrder;
/ s5 W# e: g; I5 [; b- o                        part.move(@);-- load part
3 K/ [7 W1 `1 M* S  [                        @.CurrIcon := "load";
/ A) D+ c4 Y6 W7 z) A8 o/ ^                        GlobalDistObj := part.globDestination;0 v' \$ l. J/ P( \5 }' J& B
                        assignLObj := rgmanager.rgAssignL;9 k1 J& E/ [0 C% b$ U6 Z/ A
                        row := assignLObj.getRowNo(GlobalDistObj);% S: p3 P8 [2 ]/ d' P7 j
                        if Row = -1 then -- since 70
3 g( ]. q! _/ e. b% U                                if lan=1 then
+ s! k- p4 z, k  w                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# ?: E# q% Q/ E; O4 M" G+ v
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
+ C0 W, N: Z* o' o! x! ^9 T                                else
7 @1 N% H5 U5 I/ x                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 X4 V, e1 y* A4 Q
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 B5 a' Q% u4 D$ u# v
                                end;  C7 l" f. N" x" p: ]
                        else. t% P, @2 Y0 m
                                @.Destination := assignLObj[1,row];
; M, J5 c; |5 \# c) s                        end;                       
# n# @) |# e1 D+ t                        newDirection(@);0 x+ L+ c& W, x# {- C7 K# @) C
                        @.HasOrder := true;
: D8 a# G5 E  F  H, C$ q: Y                end;
! E' Y, _! R6 s- M% ^7 I        end;+ h( V- G& M, K7 j' V& p, T
end;        -- of the method
0 c/ B9 a# \8 H2 a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; T( F% ?& l" q4 ]) A" p8 A; T+ K1 a7 @5 c+ c. R
这是AGV_putin中arrive的method。) c2 G' X, z8 G4 d4 ^$ g; C' B
1 }. J3 @( s/ i; l! Q1 R* p( [
当到达物料速度越高时,这个报警更多,4 ?* g$ y8 l& o3 x; r0 g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! M/ W. L1 r3 y7 k. w3 k
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. M9 Q% R( n/ ]' |
  u/ v# e) Y" n$ s
另外一个小建议,就是move,所有的move都可以这样
! J& t% D3 A; Z! ]$ Yif not move() then debug end1 e$ N. |* X8 N8 f# s% D( u
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. U$ y9 Z  _& L  ~5 k5 hplant simulation中的free libraries有AGV模板," h) |+ u8 k7 `  ^  m4 F
里面也有案例。
' m! P' R; {9 [, t7 K我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! F  q7 s* G3 {+ b! X8 H
2 o2 D2 H7 r  i* z7 e4 Y/ _
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ U3 m3 r' _0 a" |0 `: N2 ]+ D# x  O$ ?6 F
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- i9 B9 U1 I, ]) g+ \  D) e* q- t7 R这是AGV_putin中arrive的method。: T5 r. j/ G( P* v$ k, c, M
4 y. g1 e1 Y8 |4 S$ w
当到达物料速度越高时,这个报警更多,

5 D5 w0 o$ n& l2 X% w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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