设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9156|回复: 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- y% L1 B* J/ L$ q
*/
8 X" |" c4 f) lis" P8 V) O1 u# _' V9 A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. W$ P- k/ v& d" C6 R' x% w
do& W0 ~7 c9 D" ^- r2 _
        Lan := rootfolder.Internal.Tools.AOLlanguage;
; M% |. n' C9 S2 `+ f) p) _' M% |        if current = @.Destination -- else return
: U; `) u0 x3 p  l2 z' K        then1 Y  }8 G% J  ]( W6 G1 }
                @.Destination := void;. ^( c4 A+ l/ U
                if @.occupied then
2 ?2 j8 Z& }; o1 ?& }! W                        part := @.cont;
% f7 ~  C! t" A  b9 z                        @.transpOrder := void;
: X; m5 `' [- I: y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. ~4 C( g5 s& Q1 M+ L# K; [" i4 H% x" N                                @,root.eventcontroller.simTime);
( I! j, o, K5 C  g" S* N                        @.HasOrder := false;
# F: x& p* v: C, K& p, X                        @.DrivingHome := true;
  m$ m4 f4 n& C. K                        rgManager.tryToStartTransOrder;
  Y8 V; p( ^; O& W                        if @.Destination = void- {9 |/ }; U# D; r% R: {7 E' ]
                        then -- no transport order for vehicle @
! c3 j+ u' E& P1 m                                @.Destination :=
8 P, P  {4 _/ Z" T- m                                rgManager.nearestFreeStation(@,track.~);0 u1 L* B! L5 h, d! F8 e
                                newDirection(@);   
  q  B$ ~( L; D1 A                                if @.Destination /= void then
) R: G' S- `$ k8 v% d                                        @.Destination.NumReservation :=5 [8 z& h. [9 |3 L8 W! a: J
                                        @.Destination.NumReservation + 1;
% E; e3 Z% H1 K9 W                                end;+ f% ?  h% s& Z: d9 Q3 v* C; h
                                @.CurrIcon := "drivingHome";
5 h0 e1 o/ }% u) ]                                @.DrivingHome := true;
4 c0 v0 E: `6 _9 P1 Y                        end;- M; B) ^0 J# q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; U, ]9 Y( \# G5 h1 z* m& E                        part := @.transpOrder;, z; m2 ?& U- v4 o+ i* h
                        part.move(@);-- load part/ J. \2 {$ c; [6 N
                        @.CurrIcon := "load";: W& \% F* q2 S) N- e) O) z
                        GlobalDistObj := part.globDestination;
1 R2 p+ b! D/ ]- m                        assignLObj := rgmanager.rgAssignL;
- {) N1 @7 `5 B6 n! k/ }" j3 K                        row := assignLObj.getRowNo(GlobalDistObj);
* n" E- h! v* ?, X5 I( o3 `                        if Row = -1 then -- since 70
0 }' t1 ~% T  n$ G3 Q+ |9 ]7 c                                if lan=1 then
, Q# J3 k: I+ g' {2 n4 X& i* v9 T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 {" P# h' {, [/ h- O( g1 z& s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
$ v. {8 J/ R5 S. H/ V8 Y) f                                else
' }( ]2 `* ?. w7 B( F3 t                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 `0 s+ B) a% n7 q" W9 o  m' ^% I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 F6 u) v, s6 }) T( J5 k                                end;/ g' p5 C# W) C& N3 M
                        else
$ q6 K1 o4 ?3 T8 G% X  m" t                                @.Destination := assignLObj[1,row];: @  _5 U% v& n5 f7 A: U
                        end;                       
& j) Z; @/ r' j9 G6 l9 o                        newDirection(@);
* T2 H" u0 m' I, E# W: ~7 p/ s1 w- |                        @.HasOrder := true;
$ V$ s5 m& n' f4 ?                end;
& C) A. }+ N+ M# i( G        end;
3 p0 F1 \8 G/ O1 cend;        -- of the method
- E6 W  D) ^* R+ j. X/ K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 , E3 K( \4 b# A
. j. C8 g* x8 }  I
这是AGV_putin中arrive的method。
5 p4 U; F- I; }& A/ Q# ^' }1 m* b7 f5 q$ ]7 S6 c
当到达物料速度越高时,这个报警更多,
5 o; B, w7 W' c# O可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& p5 ~; ^* ~8 Z
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; }% X# V8 i7 @

9 y/ Z3 p, F4 @+ d- v/ ^另外一个小建议,就是move,所有的move都可以这样( K7 X2 J0 o; H  {
if not move() then debug end; o+ i; j1 \- Y! e
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: B9 y! `& G3 L2 ?2 {( Wplant simulation中的free libraries有AGV模板,- f  }( n) f- |% M8 t1 x
里面也有案例。
: V, Z" l0 D& p3 j' R* @+ V* K, Q+ M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) _6 `" I; {" h( R
+ {  ?! v$ r' A4 C4 G7 f" {/ l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) G. g# K4 W/ H
6 g, z' W5 ^. _) h! O) g8 U; Z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 7 c! D. a9 L1 F0 h1 }! L, a) Q
这是AGV_putin中arrive的method。
! K% ]! }. L( l$ ~# I: c. v% o. V3 g0 G% r& J
当到达物料速度越高时,这个报警更多,

/ z# R3 m5 j- [7 @0 d; w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-16 23:44 , Processed in 0.014780 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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