设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7627|回复: 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'0 s' L) d6 e$ _3 v" V6 x! O
*/
. f8 b( n& S- ]  Z- gis
; v2 e) ~- ?2 ^3 F: B        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 x% t7 L: S& ^8 e
do
! b6 s, [9 S0 B        Lan := rootfolder.Internal.Tools.AOLlanguage;" b3 H8 a, e5 Z
        if current = @.Destination -- else return
5 k+ u! A* o+ m/ y* q6 j# _# }        then
2 F2 G! x% a& x3 n& _* L                @.Destination := void;& b  N% v% u( e. Y( t$ d
                if @.occupied then
$ W6 [6 g8 _4 q; a                        part := @.cont;
6 Y2 T) v" ]- X9 E. k2 a                        @.transpOrder := void;
1 q) ~  z$ e5 U2 P: m                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 ]/ B! ~1 D/ _# ^                                @,root.eventcontroller.simTime);
0 a$ Y( y) h* m+ y- H' i9 t: |                        @.HasOrder := false;
/ ?' P* i' c- _/ _7 \0 L, w                        @.DrivingHome := true;
# m! `0 d1 M7 P7 g1 e9 s& d                        rgManager.tryToStartTransOrder;# g0 {) R' h7 P$ K1 Q* P1 F
                        if @.Destination = void9 V; F2 B, t# s) ^5 t. J
                        then -- no transport order for vehicle @7 r  g. S9 @+ U. z" k
                                @.Destination :=
/ h2 ]- I/ @) E2 y- m4 T8 ~' X                                rgManager.nearestFreeStation(@,track.~);
; ]" W% z3 @6 n$ x, X, T                                newDirection(@);   
& w1 x/ M# ?* J7 Y. l6 I( }                                if @.Destination /= void then6 a  z* q: q; [* }# J5 v+ K
                                        @.Destination.NumReservation :=- N% y5 T! j/ F& l
                                        @.Destination.NumReservation + 1;
+ X% V8 T& ~1 l1 N# ?+ t                                end;
) }9 h! W: R% u+ Y% Q                                @.CurrIcon := "drivingHome";; H3 @- z$ T4 H# J0 a
                                @.DrivingHome := true;
' }& ~/ }4 d! X+ l/ ]5 y. _/ L                        end;
5 u  {1 C  n$ Q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! p0 M9 y- o5 @0 q
                        part := @.transpOrder;
2 C% D+ b9 m) Z, Y5 G. S. K                        part.move(@);-- load part1 b+ C, _' O7 ^# D/ l
                        @.CurrIcon := "load";( K4 T5 J  A* U( [4 V/ t: |1 d
                        GlobalDistObj := part.globDestination;
5 _# F8 s7 @4 n+ G2 H; P                        assignLObj := rgmanager.rgAssignL;
  A7 R1 F. d* x3 L                        row := assignLObj.getRowNo(GlobalDistObj);
3 n# c* j1 V+ j8 O* I3 U                        if Row = -1 then -- since 705 i3 r% H- H$ A* N% b
                                if lan=1 then  e0 p: U, R, O: {
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, [; b5 i4 C. k0 x( W1 J+ G
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 v4 f* X8 }1 p; t. x                                else
4 B3 {5 F8 _; q# C& d                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 q% u# h& K6 a! l; x$ L6 {8 s                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 E( U; @. I4 \8 c2 s; U4 s, R1 z                                end;
. \8 d1 p) z! D8 e. A1 f5 B7 l  b                        else. d" P) }& G* r' m. W
                                @.Destination := assignLObj[1,row];
' K! ?! C) z/ a! w% j. w3 h                        end;                       
: L6 S7 s" \' ]* n( d( ?( E                        newDirection(@);* k2 _7 ^0 j( ~) a( ?( L, H  h
                        @.HasOrder := true;; k  r/ R9 J  t! U; `
                end;/ m9 w3 S7 b) z1 m8 y
        end;
6 d0 Q  x. a* }) \; t& Nend;        -- of the method. h9 [! m  E! [* M3 {. p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 @$ |& W* ]( h9 I' y7 A0 O' t7 K3 u
( w5 G, u/ ?+ N% ]+ \! y
这是AGV_putin中arrive的method。3 v. n$ |" }+ @. S$ s5 [2 R8 M3 F

. J$ ]7 `+ |! y& Z" }当到达物料速度越高时,这个报警更多,
4 p  F% b0 H" L0 o可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 O, _8 }* ?6 s% @. v8 |. n) u$ l程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 W5 N) h' U9 c$ k& l/ H3 R5 O# V9 F6 p. Y, D" _1 Y. \
另外一个小建议,就是move,所有的move都可以这样
# s& ^6 R# ]* i# A- b! |if not move() then debug end
8 j9 l( C" C6 C% q8 D" z5 R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。- c7 A! U; {" J# [+ k! F) ~
plant simulation中的free libraries有AGV模板,* W1 b) d/ w: |4 ]% F+ X) j
里面也有案例。* n- M' y3 |6 c- P. @9 b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。, n! J8 f4 }2 y  u3 p- w8 j% j

0 @6 w4 b  x& `- L4 g- m: L9 j我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" i! L) p1 H3 T# `4 o3 m2 D& [7 H0 k% W; f: S5 c
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 k8 n2 P! b" i  ~4 T: Z4 z6 V这是AGV_putin中arrive的method。- q& H; F  f3 z, n
5 p: W5 A5 q- R" n7 D  O1 j
当到达物料速度越高时,这个报警更多,
1 ~1 Y. l0 M% z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-21 00:08 , Processed in 0.021843 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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