设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6197|回复: 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 Y- `4 W. p( [7 [, T, G
*/1 d; \- N9 }8 [/ i! f. M9 P
is
0 L! r  i) Z9 G        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: _0 u& E. b, w0 v: _2 D$ @
do9 m1 x5 J. C8 A* L6 h5 a- f
        Lan := rootfolder.Internal.Tools.AOLlanguage;: \, `4 V: }; H' D
        if current = @.Destination -- else return% d( @  u7 h7 o% y- M$ i: M
        then
5 o5 T! o( n# G. F, t2 T                @.Destination := void;
9 j/ b+ y) t7 \2 b" S9 ?& L$ K                if @.occupied then! o7 E2 H4 B# ^% W* o
                        part := @.cont;
) ]+ n- n8 Q& [$ i! m                        @.transpOrder := void;' T* d( a* [' A) u( j0 U8 B& ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% a- h; b+ v, P% b. Z  H                                @,root.eventcontroller.simTime);1 ~6 M0 J' q+ x
                        @.HasOrder := false;
2 R) `6 j2 N3 l+ N. G& D$ B                        @.DrivingHome := true;; o$ @; R+ k4 a7 F& t, f
                        rgManager.tryToStartTransOrder;9 J1 b: c0 g4 n) W) p$ r' D8 h# }
                        if @.Destination = void
8 n3 m6 K( \2 V. i7 Q. H4 a                        then -- no transport order for vehicle @. Z3 v9 U, D1 J9 @/ \; c- @1 q- D$ f9 |
                                @.Destination :=
6 n4 g) I0 ], ]5 O7 p# W5 y                                rgManager.nearestFreeStation(@,track.~);) Q" A5 P! t5 `$ @( p: D
                                newDirection(@);   - Z/ l$ m/ z$ y/ c
                                if @.Destination /= void then8 i0 [  v8 {  ^! _/ D% ^
                                        @.Destination.NumReservation :=
5 \( B9 {  |; I; N; R7 K                                        @.Destination.NumReservation + 1;
& S2 b# Z/ M: o6 l0 R& f7 }                                end;. ^& [1 A& ~3 g
                                @.CurrIcon := "drivingHome";3 R6 X& U5 ]# q  \5 f
                                @.DrivingHome := true;
* d1 d5 O' B4 u4 t                        end;! r* N4 R$ O* c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 R" |, [. ^5 i9 p
                        part := @.transpOrder;
: A. B0 N( A, L                        part.move(@);-- load part, `0 S5 H, X; Q3 F8 L  \6 `
                        @.CurrIcon := "load";. t2 Y4 ?, W; P5 q
                        GlobalDistObj := part.globDestination;+ j6 U( B5 J: N: F9 d
                        assignLObj := rgmanager.rgAssignL;4 n; n7 E" }! N: w7 M6 `( M/ Q
                        row := assignLObj.getRowNo(GlobalDistObj);
9 @$ P7 l" m9 p3 @' j                        if Row = -1 then -- since 70
- ^/ _! c- |8 Z+ |. e                                if lan=1 then" F, `8 r: }; w( l3 a" I
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& G$ {5 D5 Q$ x( b                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 r6 ~/ @* h5 Q7 f2 p                                else
! p3 V$ q- Q. Q3 }                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 [+ Q0 }' W5 f                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ O9 h" z" e( T* b# P/ ^                                end;( N" s0 Q3 W  r$ v! R  R
                        else! u1 J$ ^9 [8 H" j" d
                                @.Destination := assignLObj[1,row];+ i2 m2 d. Z8 n
                        end;                       
7 D# @+ U8 h2 [+ I$ W# _, k                        newDirection(@);4 [& i8 D2 t0 U- q5 t) e/ O$ @% i+ ~
                        @.HasOrder := true;9 y) c5 v( o* K) I3 ?8 [  {: }
                end;5 T+ E; p+ G$ i) U
        end;
7 s# d3 S+ Z5 e+ a6 ]# E! Q5 }4 G) iend;        -- of the method) q; a+ B" X, X0 D2 N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 c- B' U8 B/ g& W

5 P5 D( ~7 @) I" l. L这是AGV_putin中arrive的method。
& X4 Z/ C- e, u3 O+ D" @& Q1 q
' ^+ w' `' l$ `7 d- Y$ Q* J当到达物料速度越高时,这个报警更多,
! i, _0 c, Q* F" o) Z: y6 [* ~2 v可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. L, ]) n% M; y5 G0 V% i/ h, |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  ?$ }* z; E# W1 h3 O+ A8 n
/ ^% ~- K, a/ x2 z
另外一个小建议,就是move,所有的move都可以这样
! D# D$ ]9 v% f7 a! E5 R: i! ^if not move() then debug end
, S! E' q5 ^4 |' i/ v9 E这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% Z9 [1 U7 X' h$ g. |: E3 w6 g
plant simulation中的free libraries有AGV模板,& B1 L: K7 f+ `8 _9 H' [5 b0 J1 g
里面也有案例。. G# P2 [6 h+ F0 \3 _
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 Q. ]- y7 j# j0 T4 Q4 A( \( E3 m2 W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 j! o+ d3 M0 I9 G

+ p/ a' {, u9 a  z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' |  K/ O+ n3 Z1 \这是AGV_putin中arrive的method。
: _3 u# N0 T# D( [, L" C+ ?
: y' g/ u- O* c6 c: T当到达物料速度越高时,这个报警更多,
  G- d0 f- U& ?6 Y4 Q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-24 13:57 , Processed in 0.017280 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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