设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9600|回复: 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'3 Y7 H4 `- ]2 i
*/7 [, @" V$ f8 p
is
3 O# ~4 Y: n5 ^* G" }/ V        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! K7 Y0 ]  G5 s! x+ a0 v
do
* H; b, `* a; J        Lan := rootfolder.Internal.Tools.AOLlanguage;5 j* C4 ~! p: N
        if current = @.Destination -- else return$ i6 C, i1 h3 I" Q, _0 [
        then! f0 C0 S6 C! e" y; \
                @.Destination := void;
  k! h! Q4 L$ ~                if @.occupied then
3 `. ]6 x+ N  y                        part := @.cont;) R* z1 Q+ A7 Z: E( w4 l" r
                        @.transpOrder := void;" u* |' P2 A  o  _/ K8 B
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Q8 {; w; L* q. a1 D1 M4 v
                                @,root.eventcontroller.simTime);0 }* G% F( T- ^8 _; i
                        @.HasOrder := false;
8 u* S8 C7 j/ t, a; P6 c                        @.DrivingHome := true;! N9 }' z# M4 [
                        rgManager.tryToStartTransOrder;( w4 g0 k  v  K) U( T
                        if @.Destination = void
$ m# [7 H4 l; y$ u/ D                        then -- no transport order for vehicle @
2 ~7 c- J8 d! X4 v8 H5 x                                @.Destination :=
( |3 T' Q7 j4 D0 I- F2 ?7 p" l- |                                rgManager.nearestFreeStation(@,track.~);) g  T; m* t1 O! R: l9 t' P# ?
                                newDirection(@);   / t5 y' I+ l3 }! r! N% S1 {! c
                                if @.Destination /= void then8 a% G0 v8 h) M0 G' ?% Q
                                        @.Destination.NumReservation :=) z. H! j% i/ R' G- S
                                        @.Destination.NumReservation + 1;0 X" n8 T) w4 |
                                end;
4 R/ m9 Z+ A/ H0 s/ t' Z) L                                @.CurrIcon := "drivingHome";7 P: M4 \: n" \$ k
                                @.DrivingHome := true;
: \) _3 ~5 s% O9 P                        end;) C5 A% x. o; }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 Q0 Z9 R) ]5 S4 u, E3 p3 _. f                        part := @.transpOrder;
% [7 q' G- w3 n                        part.move(@);-- load part4 K7 W" V% R( `- `' [9 J) f0 Q* }1 t
                        @.CurrIcon := "load";
  L- @0 e7 h/ _8 H. Y4 a- d                        GlobalDistObj := part.globDestination;
  ~( V' ^$ i( T7 I! J' p" X                        assignLObj := rgmanager.rgAssignL;/ _$ ~/ O2 I$ n+ Y0 p7 ~3 O2 i
                        row := assignLObj.getRowNo(GlobalDistObj);" I3 I+ g( E, ^1 g
                        if Row = -1 then -- since 70
8 A5 O6 W" O: `& p0 x" O                                if lan=1 then7 A) |2 M: [: V( V  s
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- \4 S4 X3 \) X- T6 i
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ j; ]( A3 _' q
                                else; g' @$ o" {- z$ w
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 I# _% j7 d5 `5 |1 K4 N( L4 C# S                                                to_str("in docking station: \"",?.~.name,"\""));                                9 P* V! M2 }0 R9 h& |9 }/ o
                                end;% K2 o6 b; }! O) q
                        else
# |& u6 N' `( ~: }0 I0 z: v! @! B                                @.Destination := assignLObj[1,row];
: \, M0 F" I1 K9 P3 C                        end;                       
  K' B9 f- c* }6 q( O                        newDirection(@);* `/ J1 }* |& v0 {
                        @.HasOrder := true;
+ b' ^& f0 P6 ]# ]1 p- K  i3 |                end;
3 u/ p. ?9 t* d. ]( P- U* y' x        end;$ G' x' V4 @3 T  q
end;        -- of the method
6 y; B5 R  [* s6 h/ o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . }- J0 O( Z- A

) o# T" S- w6 o1 ]" F这是AGV_putin中arrive的method。
8 j) @5 p) k( F; H% [' a+ P, R7 y6 S8 S# z" [8 V
当到达物料速度越高时,这个报警更多,- s# L% V5 H  Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  ~$ ^  F# t* @6 l' [/ w9 y6 d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% E  I+ }& b7 l4 d1 P  \+ K
1 \6 v0 s) q: u7 ^( D! n另外一个小建议,就是move,所有的move都可以这样
# q8 \1 l6 M9 g+ Eif not move() then debug end
) K% g+ ?; t+ w, g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ ?+ N7 }6 }/ ~" Nplant simulation中的free libraries有AGV模板,- D! P/ }* w1 O3 A! |# ]
里面也有案例。" `+ [1 c$ t" n9 z5 W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# F% Q2 Q, Q& y5 r2 r! y3 N
- T) H& R' U1 l9 ?( v7 T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 h5 w6 z! K( k1 v
, @! `( V6 t% V+ S) ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
. w; Q; P  L3 q- O! m这是AGV_putin中arrive的method。
/ U$ v- e  c& V
1 h7 f8 T8 i$ Q当到达物料速度越高时,这个报警更多,

$ c5 `! }3 D* I- x4 ^$ M8 @- t另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-11 00:10 , Processed in 0.017053 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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