设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8141|回复: 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': A  n5 c1 U3 I6 d  y7 {# e8 a
*/
& {0 L6 A+ D. T/ X! l+ Mis( X8 q2 y$ [; r& U' F" s9 S
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' ~# f7 g- U% s- jdo
# Q/ p1 H4 S, q& H, x" c1 J        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Z5 ?( I$ e/ {6 ]: T! W7 t        if current = @.Destination -- else return
4 r- w+ T  P* D        then
! [: g% z* e) J1 P+ `. L                @.Destination := void;( e6 H) F& C, m
                if @.occupied then% b3 R. l5 u5 O4 ?2 |. b
                        part := @.cont;
5 i: o  l* K( y( L. ~- @2 @2 `) b                        @.transpOrder := void;
/ S+ q" P7 F- p, S, W7 G* C$ f; e                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( G' p/ ^* f( a3 }# t4 ^$ i- t; z
                                @,root.eventcontroller.simTime);
4 n: ^0 ?$ C# |: t+ U% Q4 V                        @.HasOrder := false;
/ O" Z9 a6 K+ T# p; p" N1 X                        @.DrivingHome := true;- _( r" l4 A7 u/ e1 T% I. b6 X
                        rgManager.tryToStartTransOrder;1 n. b, v% @$ p/ ]& c* z/ l, Z7 F6 ]
                        if @.Destination = void3 k% H) M( U2 ^
                        then -- no transport order for vehicle @0 o5 u2 g" O( N8 ]
                                @.Destination :=
4 e) o7 X  `, I                                rgManager.nearestFreeStation(@,track.~);
) l: A' E4 D. e7 b                                newDirection(@);   
/ F0 x. _; d, O5 @7 h1 A1 H% @                                if @.Destination /= void then6 |, `! M1 m1 [
                                        @.Destination.NumReservation :=; E- m' B0 d. e/ u  s6 U$ |% z
                                        @.Destination.NumReservation + 1;% f3 b# d3 A, H* w
                                end;3 s. s! M7 m& S; D  v  U
                                @.CurrIcon := "drivingHome";
4 `! q; V1 G# R  A% x1 Z' d8 I                                @.DrivingHome := true;
3 {3 Q% u+ a; e3 x: q$ E% Z                        end;
9 p6 F( c* Q  Q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& d; N: z5 b# w: ^3 Z4 J1 ^' q6 `
                        part := @.transpOrder;5 G. f" \- s3 E9 P1 T" ]' U
                        part.move(@);-- load part
4 ]! ~) ]( o) `( q" N: Q5 E/ d3 Z                        @.CurrIcon := "load";" T5 ]; I; g% S& `' \
                        GlobalDistObj := part.globDestination;
  p: ~# Z% Q+ e' q6 C  l                        assignLObj := rgmanager.rgAssignL;# }3 m/ K% S8 ?5 s
                        row := assignLObj.getRowNo(GlobalDistObj);$ N8 e: J+ X7 s0 g/ u
                        if Row = -1 then -- since 70
( F- _  o: S+ n2 Y: f+ [                                if lan=1 then
0 O( `& d+ r4 f3 m8 {0 S0 X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 A8 ]7 y4 n* P9 p( \3 q                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; C6 [4 S' E) y: ], p                                else3 p; d- `( a; t* B
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 L$ R! c0 y. e5 d
                                                to_str("in docking station: \"",?.~.name,"\""));                                  A$ v0 D) v( Q. @) e
                                end;
& t: K# K/ X- w1 m) V& j; L2 U                        else
1 e  ^6 K2 e8 J* L# t% F* H! R! ~                                @.Destination := assignLObj[1,row];
1 U5 V" I4 m' K                        end;                        + w3 O; L' D( O6 U1 G- b
                        newDirection(@);6 w3 v, K0 m' \5 F
                        @.HasOrder := true;
9 [+ j4 q) k/ D+ P1 t                end;  Q' N: ?- |3 V6 R
        end;
1 T, G2 R. t3 A! W/ K% i; {end;        -- of the method1 X; h: v( e, S! r; n0 j- m( x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 H1 k& O: ?2 Z3 I2 \1 u

2 c) w! L9 e; J( G这是AGV_putin中arrive的method。
! Q/ J4 A' O& ^# t9 K/ P# o3 O0 @! N* M! c8 g* L) J
当到达物料速度越高时,这个报警更多," c) p; a: _: c+ V# z; C
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" M$ x' R5 c  ~( L; d4 T: D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ R0 @9 x& P, ~' e  c& p
! n0 l8 f( q  s- s5 @
另外一个小建议,就是move,所有的move都可以这样
# [* }4 Z& S! N/ y! c/ p8 J9 b! _if not move() then debug end
; i! W3 x. e# w6 ^这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。  D  I6 z6 x( ~# C
plant simulation中的free libraries有AGV模板,1 `9 E$ c6 k6 E. q( V
里面也有案例。
1 O5 Z4 o# o( c/ g我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' q1 Z3 `4 B& k" V
; R7 `! M. N+ Q+ A+ e
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ x8 f  I* ^8 W+ B
  K5 c* O1 c! d) R那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 j- Q& a5 s* A
这是AGV_putin中arrive的method。8 j2 Q# h0 ^2 ~4 X: J$ n& |. D
  r2 [* }. F$ P  ~4 R8 V
当到达物料速度越高时,这个报警更多,
/ g7 U, w! y' X4 j0 K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-17 01:42 , Processed in 0.021236 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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