设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8507|回复: 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') r9 N$ `' u9 j9 u% {; v' @  I
*/7 k. u# U, C! U8 `
is; O; r& `6 U  F( k7 k' `* E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  ^$ O( A1 X7 D/ l% K  t
do, N/ h* {8 d: b* x  I$ W9 b
        Lan := rootfolder.Internal.Tools.AOLlanguage;$ |4 ?$ m5 [3 g0 ?
        if current = @.Destination -- else return
( ]) q# y5 S. l0 Y# L( j7 v+ u        then" }* j0 S7 I: l) ^) |6 `
                @.Destination := void;
3 j# X1 r8 H7 v                if @.occupied then. [- A3 i  m7 p- S. R
                        part := @.cont;
; g1 m# L/ h% }" l5 d1 c                        @.transpOrder := void;
6 |. K4 E" y2 P' {" K! u8 @2 ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ K. b, X+ T4 s. x( ?4 `+ H                                @,root.eventcontroller.simTime);7 P8 v( y8 ^) g( T% q* }/ K
                        @.HasOrder := false;. L6 @0 }8 E1 p
                        @.DrivingHome := true;# A5 l/ S8 A' ]* c4 F$ m
                        rgManager.tryToStartTransOrder;' ?6 `+ x, i3 a' l
                        if @.Destination = void1 I, p; K) U6 [! I1 y) r/ }0 Q. {( x
                        then -- no transport order for vehicle @/ w1 n# W$ _9 ]% P7 U; F/ g
                                @.Destination :=/ A& L+ H/ M& H
                                rgManager.nearestFreeStation(@,track.~);
/ ?/ u! _! c6 U7 f- Z& I3 s                                newDirection(@);   
; _: v" A6 R; ~( z                                if @.Destination /= void then2 l: `# L& G" C9 O
                                        @.Destination.NumReservation :=
+ y2 D- r% P9 D                                        @.Destination.NumReservation + 1;5 U+ M4 O5 g" H; J
                                end;; l- R# y- h( |8 G% R% E
                                @.CurrIcon := "drivingHome";6 G$ ]/ q0 R& u# _6 n
                                @.DrivingHome := true;$ N. y  M0 C8 j6 c, ?3 n" U
                        end;
$ e2 J# L$ |/ F0 ^                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  W8 n  v- V6 D' N" }
                        part := @.transpOrder;9 e9 P, V2 E& v! Y6 P
                        part.move(@);-- load part
4 k3 N2 u* x  C; u$ w8 E                        @.CurrIcon := "load";) r3 Y: h8 I# g# s2 H
                        GlobalDistObj := part.globDestination;
( G1 o4 T1 s( M4 h6 f7 F$ w( p                        assignLObj := rgmanager.rgAssignL;
' O$ i! a; U  J# X. C9 I% K' s) ]                        row := assignLObj.getRowNo(GlobalDistObj);
2 W' Z/ u' n3 `9 K8 y6 a                        if Row = -1 then -- since 70  s# R! s. F+ D3 T) p
                                if lan=1 then
8 ~1 [6 P+ z# j9 w( X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 h$ H: O/ j& ~                                                to_str("in der Andockstation: \"",?.~.name,"\""));; ^! g# j% D9 P7 j
                                else
/ V& [; S$ p; Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 b+ X/ H; r4 M: R0 z, B7 S2 u7 l                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 u1 G" @' E" L                                end;
) a% o; h- O- y5 r2 ~* _3 l                        else
" z) p' l" c* @5 X! p  p                                @.Destination := assignLObj[1,row];, Y* }; i, b5 a% [+ X* h, q
                        end;                        1 N6 @1 e# A8 g% S0 h% K
                        newDirection(@);
$ g7 x9 `7 t$ V2 D4 I                        @.HasOrder := true;
1 q, x9 ~; W% K3 ?$ o$ n                end;
7 s4 g/ W. {7 q        end;
. R( E% A  F5 p" y0 Kend;        -- of the method
: s' N$ A( [5 F: W( K3 u1 j
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 |- ^! v/ n0 r  e- I
" q7 O/ D% f% V2 y/ r这是AGV_putin中arrive的method。* {9 ~2 K  F% s5 S4 `& `
: U: E( |) d, y( V) `  y- i
当到达物料速度越高时,这个报警更多,* S1 o$ G) n$ D. `8 J* [$ X! W+ O
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) y1 U9 v) [8 k; l程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 k8 X$ P; z0 R0 B/ w; A
" {- I, V, e# }! M/ {
另外一个小建议,就是move,所有的move都可以这样: R" a; h  I1 s& l
if not move() then debug end
6 D8 [% ?* }3 z8 `# X1 m% K8 @这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ }+ E& V% ], ?
plant simulation中的free libraries有AGV模板,
$ R1 D+ R  t0 A7 Q, O1 `/ s2 W. W里面也有案例。+ T/ E1 r/ X0 g" o+ x" p! T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 D. a, r) z$ ^  G. @' e7 _5 h2 z) f& @- e2 A! l' L, v& \, d
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
% I. L) Q! n! q7 _4 ]
* S  f! m+ Y  O# j- V那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
6 ~6 Q9 v3 H2 V3 P6 J这是AGV_putin中arrive的method。
3 q; x2 |+ d. E  m% B& X) f' c% j
当到达物料速度越高时,这个报警更多,
! O" P" V( K) U; p$ B# ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-8 06:47 , Processed in 1.667477 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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