设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9685|回复: 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'' X$ I9 `4 ^5 y4 [+ q# w1 ^
*/
! H1 L3 L) m! B& y4 Dis
; P) n8 H' l# S9 `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* j0 g+ d3 p* u* |( o
do
9 f, I2 t$ U8 ^" u9 f$ B        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 c* }8 @0 M- A        if current = @.Destination -- else return
3 s$ f4 q3 {" v: S( c( v/ Z' `* y        then
) F7 J' I6 W; o" K+ z                @.Destination := void;: G" U. Q5 a6 P6 V' z+ j: O
                if @.occupied then
1 N- _  J4 \5 r                        part := @.cont;9 I, D6 b) A* C+ A' N+ u3 c% u
                        @.transpOrder := void;
" X4 f: z' }/ s$ X1 o; k5 E                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: M8 H0 e7 T# b) E
                                @,root.eventcontroller.simTime);
# b8 \2 w0 F) f  H                        @.HasOrder := false;
! A! w7 P) }- n) ~/ @0 D                        @.DrivingHome := true;' W) i3 L* X' S( U
                        rgManager.tryToStartTransOrder;
. h, ~+ E8 s3 \7 T                        if @.Destination = void: W$ @6 b( p0 k
                        then -- no transport order for vehicle @
" R% n$ S& O9 E6 j1 e. H! }7 t                                @.Destination :=8 M" i; q1 Z  g# n
                                rgManager.nearestFreeStation(@,track.~);
" _- M# m6 g. E+ h1 J5 m                                newDirection(@);   
% w. R  g6 _) a+ W$ I                                if @.Destination /= void then
/ l) i6 [* Y/ v  r, u! P                                        @.Destination.NumReservation :=6 d9 e2 A9 [/ |3 E1 ~) g3 m" d9 ]
                                        @.Destination.NumReservation + 1;
: {! U; ]' h3 N7 M& \                                end;' \' |6 |$ [3 }
                                @.CurrIcon := "drivingHome";% ?& r4 g& e8 a+ d# n! B! h; d
                                @.DrivingHome := true;
8 D# v6 d0 Q- A                        end;
* K' U) e; l; Q. i: p+ o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 A' n7 m* [# n! [1 L4 _; k                        part := @.transpOrder;* I; M% e. ^: n3 J
                        part.move(@);-- load part
8 `) y; ^$ C. A" r                        @.CurrIcon := "load";
# j* _) a0 q: p: K+ U& ]                        GlobalDistObj := part.globDestination;
' C/ F' `9 p3 X7 V; [0 y7 q" _, L  g1 r                        assignLObj := rgmanager.rgAssignL;
% \, ^. C$ q5 ]1 u: d& G' e5 V" {                        row := assignLObj.getRowNo(GlobalDistObj);/ U' b1 k/ i' h0 |4 l
                        if Row = -1 then -- since 70
/ T8 R9 }' [0 _                                if lan=1 then
; G, `" g7 y* G! J' j3 m* Z4 W3 ^                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# s- C3 A  P! i( ~) U+ \9 J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* z) _' @" J1 c% c" A2 p
                                else
. U! C( a# }1 c& N7 `7 X; S7 U/ b* X                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* @, d3 z$ d. I/ b* y                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ v7 j3 d, t) C0 q5 T7 I# s' `                                end;
" S1 Z9 ~( y3 @3 \/ l6 M                        else
/ ]$ [2 j# n- g, s0 o; `                                @.Destination := assignLObj[1,row];
/ C% T' ^$ l* r! J                        end;                       
7 [/ f1 D8 `9 Q8 j2 E! ?; ~                        newDirection(@);( x- B2 D% i+ w8 u9 ]( |
                        @.HasOrder := true;
9 |3 i. @+ Z1 ?2 I                end;8 ^+ Q; e3 I$ N; y5 _' o$ N
        end;/ Z  x& M% o3 x" Y2 Z2 i3 o
end;        -- of the method4 r2 v' O& Q$ L* n) a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + Z) g# g9 }! B" N& j
1 i; E  _" _$ d( `, O
这是AGV_putin中arrive的method。
. X% @! A/ i5 \2 i8 O' K1 J: X% ?, V( F# x) s$ L
当到达物料速度越高时,这个报警更多,8 n$ H% V) X  j' Y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& Q3 |3 ^: M9 K  f" G  P/ @0 ~& S
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( T/ p- `6 f5 {/ A

8 d; M" a- B/ }另外一个小建议,就是move,所有的move都可以这样; b9 V0 v5 }+ f8 o" \; {4 u
if not move() then debug end0 ?. a2 k, @' o  _+ K
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
8 J/ P1 w7 i7 G  Kplant simulation中的free libraries有AGV模板,
( m. n+ z" k- R) H: X& L1 p/ ?里面也有案例。
- T% M2 g* H# E) Q( i2 l% W( C6 a我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
* n- }3 E* q# Y' C% i% x- |8 t% t5 N9 J) Z$ N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) W, m$ g6 P9 N+ k' [+ l2 L
! `3 }- l0 A& y. {6 {$ c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: k6 v0 z& V6 O# q9 B1 e9 k这是AGV_putin中arrive的method。  \/ A6 M- A2 m( u, z! |" c0 i& {  m

# z! H$ b+ X, F! N4 [* ]" ^当到达物料速度越高时,这个报警更多,

  W6 Y! Q. X+ @2 E另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-17 09:22 , Processed in 0.020922 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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