设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5776|回复: 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% |( q3 T& q*/( G3 g' L+ ]* i$ C7 l
is$ w" D2 j5 t6 R
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ c0 M8 s, e: `7 n
do
7 X' h; g6 k$ j+ Z        Lan := rootfolder.Internal.Tools.AOLlanguage;# s. c$ Y) d2 i+ X  S1 ?1 [
        if current = @.Destination -- else return/ h, u1 z$ t& t8 A
        then; f8 c; @6 k1 V; n" Z* Z
                @.Destination := void;
: E: V. w2 E& p                if @.occupied then* ?% X. H4 d2 u/ m5 M
                        part := @.cont;
; S+ o7 d/ k# s* ]$ C! o                        @.transpOrder := void;* L2 j4 O9 ~# L/ o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- w9 o/ |; k9 P' e; N( C                                @,root.eventcontroller.simTime);
0 D' h: A" b1 }( U7 V7 d$ f2 Q                        @.HasOrder := false;2 q# F3 M% W' k
                        @.DrivingHome := true;
0 k) L# |; T- \3 s) D2 C- F) S                        rgManager.tryToStartTransOrder;
' Y* N$ p6 L" d" G$ ]                        if @.Destination = void( _' p. ?! M- J/ D: Y7 m
                        then -- no transport order for vehicle @
7 ~' B$ P( A/ g, X+ ~! D) A% L                                @.Destination :=
, f" J  Q2 q8 {3 C) C6 \                                rgManager.nearestFreeStation(@,track.~);
  D: m+ n7 r0 O: Y+ S$ E* S                                newDirection(@);   
& P  J  \* K# l4 W9 B                                if @.Destination /= void then
2 q# b- U# Y# U0 [3 A                                        @.Destination.NumReservation :=
; n6 \) [2 H$ t2 m/ h8 {6 f                                        @.Destination.NumReservation + 1;
  a* ^, C! u2 f" V6 z" ?                                end;
- ~0 l( l- S5 ]; J3 A  c                                @.CurrIcon := "drivingHome";
4 `6 v6 Z- r! v2 L, ]) X* _9 G                                @.DrivingHome := true;$ j6 B6 d! M# l
                        end;
( S$ R2 w: k. M( f: Y+ ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 ]/ p1 O) e+ G1 B! A
                        part := @.transpOrder;. ~7 R( H& Z2 ]
                        part.move(@);-- load part
7 v1 g/ [# Z& [+ u& F8 f                        @.CurrIcon := "load";
8 k0 ~3 i6 v; B9 y8 a8 e& L                        GlobalDistObj := part.globDestination;
) l. [) x! v" P, Z# l) |1 ~                        assignLObj := rgmanager.rgAssignL;
* E  Q; M5 Q( z- z                        row := assignLObj.getRowNo(GlobalDistObj);2 E7 D3 c4 i5 \+ G. o4 c5 f
                        if Row = -1 then -- since 70) H& f4 K2 ]( J* a  T6 p' U7 N
                                if lan=1 then
! l/ I- c% X3 K  _% E                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 o; y4 d" P1 `  M- _# q! _" H/ j
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: `2 c! {/ U5 i3 }! b: Z                                else
7 G' v  t9 f$ t: v/ R* c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ `2 s2 n3 A8 {, `0 h8 h6 U                                                to_str("in docking station: \"",?.~.name,"\""));                                ; {6 v6 F' B, F
                                end;
" b. Y  f7 F' f                        else
( `, e) L; S/ {% I  Y3 {                                @.Destination := assignLObj[1,row];  n3 w4 l+ c$ Y( l  o5 a( S
                        end;                       
( t6 K& t( T5 K  `1 H( ~5 p# ~, y                        newDirection(@);0 u" E% \1 z2 X5 P5 ]
                        @.HasOrder := true;: A$ `3 W. P& g$ ]! h5 z
                end;3 Q. E8 K' d* x- R( u3 K1 c
        end;9 H# u6 m. c. f# A/ W; V& ?5 S
end;        -- of the method5 z! P$ W5 }- N. B% O8 R5 `( y! q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * Z9 }0 Q( }. O

; A* f! L; k( G4 U1 S# F; M4 g这是AGV_putin中arrive的method。+ X, E# C' w% Z- H" f" P

- b5 i# [5 A+ n& ]+ I& d: G8 p4 w当到达物料速度越高时,这个报警更多,  }3 ]$ b4 Y2 e2 u6 P
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 u( t% B9 c" I, m3 b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' H+ o* |6 z1 A# z" W
9 Q' i9 H* S, H5 M5 K2 @) O
另外一个小建议,就是move,所有的move都可以这样
9 F" z. O: z/ r! U4 C$ ?if not move() then debug end  T9 j5 g! x8 J7 `* T6 x0 D0 Y
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# u# S* H' s( T! D
plant simulation中的free libraries有AGV模板,* v: n0 h2 c* V- n3 f/ S
里面也有案例。* w  w7 s7 L9 N! C; \
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。2 L1 x! m: K" T2 ~
; P5 j% p. Q( T" P
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
3 r0 h6 Z" p2 r  d
$ S$ ?/ h0 y/ N% t那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; _& `0 l1 Y9 b1 ~这是AGV_putin中arrive的method。( ^! ^$ i& y, \1 K! Z* U
, X+ H& k2 }1 X! j' p- ^
当到达物料速度越高时,这个报警更多,
! h9 C5 b- d3 z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-19 09:46 , Processed in 0.020943 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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