设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9559|回复: 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'5 j( _8 B( I/ r4 R6 s6 c4 ~/ k' V
*/
- C4 H1 g3 Y7 \7 _; `- e0 i5 pis" P; L6 Z' G0 k% B
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 D/ X7 ]2 x; S7 S, r
do
% q+ Y9 K- h2 y6 J+ J! I        Lan := rootfolder.Internal.Tools.AOLlanguage;, Z. H0 Y6 K7 C8 Z
        if current = @.Destination -- else return  I+ X& ?* Q6 J% Q  F
        then
4 R$ S! ^$ ~# h% U' B                @.Destination := void;
" O1 w& O3 v! U3 P, d3 M" [+ C% b9 _                if @.occupied then9 I+ Y6 R- y5 O5 s  f  O
                        part := @.cont;
( H/ r$ n; |. f; {, {                        @.transpOrder := void;
5 B1 U; J$ \" y8 A! ?/ S                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  p, Y2 k+ x8 r
                                @,root.eventcontroller.simTime);. T$ T. n+ [/ v) k
                        @.HasOrder := false;
" x6 M* W% \0 e% ^6 a                        @.DrivingHome := true;
) ^$ G8 [; Q- f$ A                        rgManager.tryToStartTransOrder;
: w6 l# J5 p: e  C0 _( L% F0 z                        if @.Destination = void" U2 u) A  b) Z! L2 B1 _$ D
                        then -- no transport order for vehicle @
) ~6 ?. ~! I& F4 V! K                                @.Destination :=
7 S  J$ `' G) i9 m6 N                                rgManager.nearestFreeStation(@,track.~);- T4 D* F2 A+ E. c' u
                                newDirection(@);   ) Y* T; y" B& [0 a" w: d0 ]
                                if @.Destination /= void then, j6 y4 ~; w3 V: m4 n
                                        @.Destination.NumReservation :=
) O1 S" t8 `! B. E& G9 M                                        @.Destination.NumReservation + 1;" O1 a* ]5 x' s5 Y
                                end;
8 A- p5 _0 P1 F  ~3 v                                @.CurrIcon := "drivingHome";
  b; c8 X0 {. g: q0 {4 n$ X- Q                                @.DrivingHome := true;
  v# I, r7 C! [' F7 V! _6 W3 q, C                        end;
) h' u$ \& {1 Y' e" L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 A2 j' K  O4 t! H5 A: a
                        part := @.transpOrder;4 ^% i) w# h* E  e! U( j# g; D! J" O. l
                        part.move(@);-- load part& q3 w% P4 F  J( i6 C! x
                        @.CurrIcon := "load";
$ e' N& O5 w; W                        GlobalDistObj := part.globDestination;
7 }% v$ k. S6 P! X                        assignLObj := rgmanager.rgAssignL;9 g: l5 X4 X. s1 L7 u
                        row := assignLObj.getRowNo(GlobalDistObj);
9 @+ Z1 v5 d  g. C! P                        if Row = -1 then -- since 70
" ?* p1 ^, a' i. ^  R! V                                if lan=1 then% {/ I' u+ K! E8 Z; q' @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* f: _- H9 I2 E                                                to_str("in der Andockstation: \"",?.~.name,"\""));! a1 U" @; V7 @
                                else' T( y- u( C5 H% I# Q" T
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 p; V7 [9 ]! e0 n# D  |' N                                                to_str("in docking station: \"",?.~.name,"\""));                                  D" u0 v7 T& Z2 X5 q
                                end;3 V, R0 D7 m$ ?* e
                        else
8 d& f2 g! w+ }6 c                                @.Destination := assignLObj[1,row];! S+ y  W/ e5 v. }# p3 H, h7 e0 l
                        end;                        . B9 Z5 i) b, V; m7 w! a
                        newDirection(@);
5 i4 T- F7 c; v1 ?                        @.HasOrder := true;7 G9 D, ~$ C. u4 N
                end;0 r. K% l6 g' u  N" o! m% `
        end;3 W" x& z# x2 C1 ]
end;        -- of the method( B2 A* W4 |# W. S, N& o) [( ^5 A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 E" Z+ A  o) W, v. l1 `
$ A: y' ], v$ f/ Z. `* u- l
这是AGV_putin中arrive的method。
6 O) X8 Y: x$ d; d: L/ J3 y" k# f5 V2 W$ {
当到达物料速度越高时,这个报警更多,
( B. ~& e9 [) U可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ w% S. \; P% ~; b9 z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' a4 b: ]" H; v/ ]' e

  ~+ G) V+ }  X2 j3 g$ z  g6 F另外一个小建议,就是move,所有的move都可以这样# ^) ~& X: B2 [6 Y3 h
if not move() then debug end" i8 _# N  t7 ^! {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& w$ f. {! L; Z" uplant simulation中的free libraries有AGV模板,! z& V! E5 ?' `7 o! I$ c
里面也有案例。
% j5 C" u4 a% a7 }  s+ y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' _/ s+ _* ]% v9 z4 s$ e  B
- n% v" B5 @  a' P
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- f/ D$ ^$ S# E' f8 I1 v7 H" {( G9 P' }  i3 y; y2 h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 H6 R! l. J( Y+ ~2 U6 j9 f这是AGV_putin中arrive的method。
- ?" o) C4 Q1 C) w9 V
7 ]: ~1 a% T7 \* V8 |% z当到达物料速度越高时,这个报警更多,
  y% j! C& r8 q' C& r( a+ Z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-8 00:47 , Processed in 0.016623 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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