设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9730|回复: 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'
! s/ w; \5 A1 u' A2 ], {+ I*/! ]3 R6 m9 b3 ~/ y9 T
is- W6 P6 t" R) n9 M: l8 D6 G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: i+ r3 g7 N' o7 }' J% s% A/ a# V  r
do6 d4 t: ~7 i( s" g5 B) e
        Lan := rootfolder.Internal.Tools.AOLlanguage;
! f, r& u0 u+ b        if current = @.Destination -- else return9 V' G8 x3 J5 z- N: l/ T
        then
( S$ E3 G: L8 R) i* o' C                @.Destination := void;
& p; O" \3 w+ Q. F7 f: U                if @.occupied then
! O+ b# d5 P  b4 K6 m# b                        part := @.cont;* v9 J! q/ D3 G; g+ O8 x
                        @.transpOrder := void;  v+ b- u+ Q: g9 W5 [: `
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," U  r1 o# ^5 i  s5 X4 N' C' U
                                @,root.eventcontroller.simTime);2 p' k% \9 q! d& j& Y9 a
                        @.HasOrder := false;% J0 y& T# i! A+ [
                        @.DrivingHome := true;3 \6 k1 [. J$ ?/ r6 O: u3 w4 s
                        rgManager.tryToStartTransOrder;
+ U/ J6 Q+ [  r* C9 B1 ]                        if @.Destination = void+ _: d" e: g) Q2 o9 g- o# E
                        then -- no transport order for vehicle @8 \+ p- F! _" G0 _- _2 B5 p$ U3 |
                                @.Destination :=
6 P: r; _# ^/ d% O6 m6 {/ ]                                rgManager.nearestFreeStation(@,track.~);
, V8 ]5 L+ R, }& w$ S                                newDirection(@);   / c8 I( c# O9 a- }5 {/ M/ i. l* v
                                if @.Destination /= void then) N4 f/ S1 w, f7 {# F/ U. i
                                        @.Destination.NumReservation :=
7 s5 u* c& x" R0 B, ?3 V3 y8 t                                        @.Destination.NumReservation + 1;  e* H: y( H3 u& c
                                end;
8 O) T, N, t! E7 \, e                                @.CurrIcon := "drivingHome";9 f& M+ h# `# w% z
                                @.DrivingHome := true;& `/ i& v) Z" L
                        end;
5 z0 o3 O: U! C                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ F( I( c# d+ z! e+ K2 Z! G
                        part := @.transpOrder;: x  p$ t/ J5 W9 o: x. A- b: C! H
                        part.move(@);-- load part
& p7 J- K3 b8 y, v8 ~                        @.CurrIcon := "load";+ b% F- Z/ p6 b( D0 I- J
                        GlobalDistObj := part.globDestination;
' F, a9 z* K2 }, J9 u" i: B                        assignLObj := rgmanager.rgAssignL;
# a& a% x- |) r/ }, k6 L                        row := assignLObj.getRowNo(GlobalDistObj);
- U7 y" [  z4 O                        if Row = -1 then -- since 70, r, c$ c$ P; d7 U: a2 M# Z; q
                                if lan=1 then
$ {' O( _0 K5 `# l7 W                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' G4 \* C4 Q0 R, R7 g* X                                                to_str("in der Andockstation: \"",?.~.name,"\""));
6 @) r; Z- t0 }# {2 _: A! s                                else/ p! e. F; s% ?0 v
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 S- t1 N2 T: o: r
                                                to_str("in docking station: \"",?.~.name,"\""));                                - Z; V+ {& v2 z' ]/ X) b3 U
                                end;
' N3 m' b8 l, I1 j. g                        else
0 S' f: I/ S8 z& |# \. Y                                @.Destination := assignLObj[1,row];
  n3 q4 `- Y3 V% u# A                        end;                       
# H: w- n9 r% U7 e7 k% d                        newDirection(@);
* b9 h; t$ y$ A( N* l0 e  }                        @.HasOrder := true;
  X' `3 |8 U+ X- }                end;, v' S# B) i+ y4 k3 y* a( v- Y" `5 [. w
        end;
( k: B2 u* y2 X) j- |, jend;        -- of the method
, j; Q* }2 j4 g2 B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ J7 i4 c! s! ]# ^& v* i! `/ J: I* J$ q; b; ^& r
这是AGV_putin中arrive的method。
" N0 p0 l" R" M: ?, q, z- O9 J; g
0 [' ?8 [) t  ^$ \- C3 P% @当到达物料速度越高时,这个报警更多,1 F  A1 S  S% Z+ k, a1 X9 s) s
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% W( J6 L  X  Q1 n3 y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% o) M. d* O. o; J& N$ G

% [4 E6 m& S. Q/ U! _3 Q. L5 h5 @另外一个小建议,就是move,所有的move都可以这样
. s7 m" Z, `3 cif not move() then debug end( V- b* b# w8 i% v! h# o0 k
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 {" R$ n& k4 I) a; jplant simulation中的free libraries有AGV模板,
! \' O4 e  n$ y" I3 Q$ U- k里面也有案例。/ Q2 V8 a/ T: r- {/ n" o: P: Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 \" O* G8 `$ g7 k6 n6 P" A2 `% y
$ ^- S6 I  `. V+ y% d8 c( G& x
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! V* U9 [3 f, k1 }, m  ^7 d7 U

( \/ Z1 D- @$ o- r那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
7 Q8 ?9 V) I- W8 I这是AGV_putin中arrive的method。
  ~0 {4 J/ X6 h, S; t3 T3 D& B1 I2 q4 a( n9 Z- p4 T
当到达物料速度越高时,这个报警更多,

) N; y! S. c( ~' L, T# K另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-21 00:56 , Processed in 0.020527 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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