设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5873|回复: 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': N; j" k! R8 Z, E$ w, m: X) ~* n6 T4 M
*/
5 p7 L# t% I7 E" wis8 j+ g* s& g- @" {0 p% \' V7 M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ J6 H0 G/ S/ P  v, B' ndo3 J: v- k* o% M* I) \# Y, q* ]" H7 |+ G
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! f$ h' Y) Z+ u' }! N& A        if current = @.Destination -- else return# F5 H- L9 h6 J; i( Y- s$ d) G8 F
        then
4 D  Z) A6 z% N. E2 U1 G9 w                @.Destination := void;4 T8 |0 c& p8 x3 s
                if @.occupied then
8 L2 T' s  b) ^) `                        part := @.cont;1 P/ g$ a  m: G
                        @.transpOrder := void;& n' _! I: W7 V2 C! [+ w; J
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. N) K( N3 d% x* R  p( Z; e# K! C
                                @,root.eventcontroller.simTime);. p  N! Z# L: J6 w8 m
                        @.HasOrder := false;
5 K' Y9 }" j: z6 q* z5 q( o                        @.DrivingHome := true;
6 l- f$ j8 Z, R+ y                        rgManager.tryToStartTransOrder;
+ E' M( h3 [6 P5 ]' v' U9 }                        if @.Destination = void3 m7 @& R- e. K1 s! R
                        then -- no transport order for vehicle @
* M, g4 o  N+ C+ g7 c* q6 |5 J4 U                                @.Destination :=
# y8 ~# J6 Y; N# H. a                                rgManager.nearestFreeStation(@,track.~);" {% H* l4 U( Q, a3 k8 f
                                newDirection(@);   
! H3 @/ c  L0 d$ P1 o; L$ i                                if @.Destination /= void then
3 B( k* `/ J6 W8 R                                        @.Destination.NumReservation :=
8 j9 ?0 g& r8 R! Y% f0 |5 ~                                        @.Destination.NumReservation + 1;
) _1 C# W- k$ L: `                                end;/ E: t5 C' T2 h
                                @.CurrIcon := "drivingHome";- }) g9 Z3 z4 ^$ x: }
                                @.DrivingHome := true;
) e& [$ G- b: r                        end;
2 [+ B; ?9 ~9 X# t- |4 M! D                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" ?( X5 W, g6 L7 P$ R% d                        part := @.transpOrder;
% w; \: ]# ]5 a( p! z                        part.move(@);-- load part
5 o2 R' R9 F& L4 Q) ^) k( u! z                        @.CurrIcon := "load";- ]/ H3 l( ^9 B
                        GlobalDistObj := part.globDestination;
) a: h5 I: G6 j4 |+ h3 L  b0 e" v                        assignLObj := rgmanager.rgAssignL;$ n0 o) j/ b# b4 t# @
                        row := assignLObj.getRowNo(GlobalDistObj);+ N0 p$ x# o  b, n
                        if Row = -1 then -- since 708 U6 n! S8 w6 M! c
                                if lan=1 then+ q; i8 N: o2 Q4 D0 [- j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 e, D- o" u, k                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 E( @# o5 ]% x; A$ {4 }
                                else
4 ?0 W( Y3 G; G4 d4 T- ?3 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 D( f; r6 J6 a1 \6 h* r# g# r! \3 q* P                                                to_str("in docking station: \"",?.~.name,"\""));                               
* M1 b6 B% A$ A# _2 }. t                                end;
8 e9 J7 U6 n7 H                        else+ k4 d4 B) M8 D$ C/ L. C& b. |
                                @.Destination := assignLObj[1,row];2 L* c# R8 j- [4 a6 ?) _8 U  X
                        end;                        3 W  \6 }2 t! y; {+ j2 L
                        newDirection(@);
3 F( I: b1 E, }5 N. O                        @.HasOrder := true;4 [7 V% `$ [5 B8 L
                end;% U* w$ ~, a6 t( q# l6 k# K
        end;) q, _" q$ @, g' x
end;        -- of the method% w' X0 U3 o$ p* b; W  c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' D( ~- m1 g  `' `( M
5 s; H' b8 m) ^9 y7 e# ^8 ]这是AGV_putin中arrive的method。
2 ^0 J7 n/ q0 j
: g# P" N+ ]) V' @+ u3 L当到达物料速度越高时,这个报警更多,
- |# w& n+ F0 [% b可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) |6 U& Y  o0 O7 w
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ Z1 g+ t" e7 ]$ f
% a- P8 j3 ~+ Q6 u3 X
另外一个小建议,就是move,所有的move都可以这样
6 }7 U0 ?: g( _2 Rif not move() then debug end3 x7 O" t0 ?2 M. b0 L
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ `# N( Z9 `8 ?1 U7 Kplant simulation中的free libraries有AGV模板,; M: D1 g& l( ]  ^3 C& K
里面也有案例。8 U! V' g2 a9 B$ A9 i' b& L+ s: [
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ c% I; P3 h" s. Y. W# m4 T, x+ V$ k! o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# q5 f4 Z; U9 ?# J: [, |8 e5 B( l
, v( P5 K6 {1 l' ]% V那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( j3 V# J7 v# @- N) a3 m2 n6 ?
这是AGV_putin中arrive的method。% ^* \# z" F+ m2 J

+ k% k+ b, {) w1 M0 o当到达物料速度越高时,这个报警更多,
* R, Q( g) D% H* ]
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-28 13:06 , Processed in 0.020122 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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