设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8241|回复: 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+ J) Q1 t! V3 h+ P
*/
* Y- l& X3 J, K. R$ T( Xis' W3 P- j4 x: m& @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ n$ y9 w& I) X& i7 }do
4 {) J% ]. ]  |) ]+ p3 t- R4 S, G        Lan := rootfolder.Internal.Tools.AOLlanguage;
* I, c2 ^5 o4 B0 n& d% x        if current = @.Destination -- else return# O  ~( b* V: F! O8 m
        then7 o: A: E; [9 n" i
                @.Destination := void;
% T- {! W* F! ^8 T: u+ M                if @.occupied then8 O( _! y% k5 a9 Z$ _: T0 s
                        part := @.cont;5 ]9 T, P: k# X
                        @.transpOrder := void;
- |, }4 h. S5 f' z  S& q( R- O                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 n4 d3 `8 V3 C0 E. {& O7 j/ p% A  K                                @,root.eventcontroller.simTime);
& E( T9 t% @+ t- N7 E; ~8 |( j+ T( }9 B* Z                        @.HasOrder := false;; R* z, F8 `% G$ j- ?
                        @.DrivingHome := true;, S$ A9 c1 R4 S1 o
                        rgManager.tryToStartTransOrder;, J2 Q0 _5 V, m8 E
                        if @.Destination = void( x0 `; Q6 `0 W0 _  b
                        then -- no transport order for vehicle @
' D3 p: J! @4 A0 H$ R+ i                                @.Destination :=5 U0 p. C% G/ X/ n1 J+ I
                                rgManager.nearestFreeStation(@,track.~);
8 m' c8 s; |/ y, |                                newDirection(@);   
7 r) ~' }; C4 s8 Y                                if @.Destination /= void then
. G3 @) C' q3 E* d) |  Z% d0 s                                        @.Destination.NumReservation :=; O9 r4 u2 v! O3 e9 k& I- e" L
                                        @.Destination.NumReservation + 1;* v# T8 Y4 h- a* M
                                end;6 J( l% [: t) B* q! w- _7 m9 E/ B
                                @.CurrIcon := "drivingHome";* i3 @4 f0 u8 K3 O0 a
                                @.DrivingHome := true;' z8 X* u$ ?, g1 Z# S; a8 h
                        end;, L6 M" i) a6 x5 V0 c; V9 P* z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 f& e1 z6 _  h; D0 ~1 c
                        part := @.transpOrder;8 u1 H5 o7 X+ w2 Q% e" a# J
                        part.move(@);-- load part
) O- ]+ v6 J: D, y                        @.CurrIcon := "load";  ?7 D" N2 }2 ~" D" y6 ^
                        GlobalDistObj := part.globDestination;
) |7 @& \5 |7 h                        assignLObj := rgmanager.rgAssignL;
3 t9 q1 Y( S& x                        row := assignLObj.getRowNo(GlobalDistObj);
! Z7 J  {6 E, K1 l- o3 p                        if Row = -1 then -- since 709 u5 b8 i* @  z  v- G" U
                                if lan=1 then; }4 i1 ~" x' E6 I
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( H; i. O) |2 A; q. y) Q                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 y. N9 P4 k, d$ F; x
                                else
1 \7 _5 F9 i  x" ?# H% @                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( O! |0 y# @6 |/ F- t% k                                                to_str("in docking station: \"",?.~.name,"\""));                                + |" k6 z' [7 T4 N
                                end;
5 t  z7 K! X3 w' j, s! q                        else. K: g, l; A" Z" H
                                @.Destination := assignLObj[1,row];( t2 }$ x6 T1 D9 ]! ~  [
                        end;                       
. {0 F) \- r# I/ @* v, P                        newDirection(@);4 Q  I8 O$ `- J8 Y4 i
                        @.HasOrder := true;( s/ d" v) V" T/ `! l
                end;
3 X- \9 T& O: E; @! v/ q        end;
5 E' G; X: Y! j; ?8 Q# Xend;        -- of the method5 H6 [4 G" V. `: t; A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* ?6 e& [$ ^* G4 Q  i. v5 K$ P# }2 }
/ G6 M" [1 b- R- G$ I这是AGV_putin中arrive的method。
0 u7 y6 f7 f; ?; n4 ~- E" U2 \3 }. `9 J' q" ^( H
当到达物料速度越高时,这个报警更多,* d+ ^( q3 M* U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 u) u6 O; {& c/ O) ~% P8 \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 F; d% K1 s( i/ _' s7 [
( `3 P; `! w: ^5 y
另外一个小建议,就是move,所有的move都可以这样
8 _; [- ]0 y" K" H5 U; W, Eif not move() then debug end
& g2 \5 z# T, x2 [这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 j+ J" S- a7 B3 @plant simulation中的free libraries有AGV模板,
% ], Q% Q, v, S里面也有案例。7 I& @. v% D: z$ \1 f* P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 @8 Q0 h' v2 C9 D; L+ {1 W1 v: S& @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: M/ M0 \- [: R1 m. e! U3 F8 Q% u; B  Y! r' |
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 s/ i# |% d: |8 X
这是AGV_putin中arrive的method。
1 b6 t6 N2 t! M- K; |, K2 e2 t: T9 P& G
当到达物料速度越高时,这个报警更多,

% V0 H* w; q+ S& b, D另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-22 19:32 , Processed in 0.023763 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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