设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6843|回复: 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'
9 g5 B- I7 L$ T' s4 `/ {*/
7 s$ L$ A" c4 X2 J, W7 Q7 Xis
# [8 {" N# \7 g+ _* h" K" C6 t" I        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% \: n6 H1 {; n* Zdo
3 S3 q/ N5 q- l/ k% N' Z; x        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ B7 \7 S" h# v1 [9 v4 o        if current = @.Destination -- else return
* A+ c- b$ P9 X/ q  D* l        then
# K  Y, ?$ ~) ~9 t                @.Destination := void;, g/ w3 a7 y; s' z+ W) y
                if @.occupied then3 o* @- L8 p: B0 R2 g/ e
                        part := @.cont;
+ f# E7 @. u0 H6 k7 u                        @.transpOrder := void;
0 `1 l, K# T4 w6 {( f                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! H1 K# u+ \7 h. Z                                @,root.eventcontroller.simTime);
4 _) X3 X" M* `                        @.HasOrder := false;! b8 H7 U) p9 {( W8 j
                        @.DrivingHome := true;. b) _3 I' v2 t; C) p+ h
                        rgManager.tryToStartTransOrder;
# X7 S$ F% z: m1 v                        if @.Destination = void
# u, B& N  _, @! Z! u                        then -- no transport order for vehicle @$ Y- L8 g7 }4 Y1 I0 K
                                @.Destination :=( W/ O8 \* F% H2 ]! ~, \
                                rgManager.nearestFreeStation(@,track.~);
5 b% P; O1 J! U- l3 S  Z' G8 P                                newDirection(@);   
% a; O( \7 y( J/ {9 @, e                                if @.Destination /= void then! r# g. b5 ?5 U# ]# G
                                        @.Destination.NumReservation :=, G$ ~$ l& s( U. @9 O- c# O7 E
                                        @.Destination.NumReservation + 1;
: C( o9 B5 V3 ~  _$ X2 [                                end;% c' P5 _' a4 H. c
                                @.CurrIcon := "drivingHome";
* O: E; t. K, e3 C2 N, ?8 D+ H# H                                @.DrivingHome := true;
0 J. l: n2 s' e- L$ h2 }$ K; E                        end;
! z( b- h9 w7 X                else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ?2 O2 M1 F) F2 E# i
                        part := @.transpOrder;$ @4 s; T  N- R( A  U% f7 u7 I
                        part.move(@);-- load part
, J( }/ B3 U6 h( p0 c                        @.CurrIcon := "load";
. _+ K8 i# a  l% [" Z& J                        GlobalDistObj := part.globDestination;
% E9 e6 M2 m" g# h# f; O- t6 ?                        assignLObj := rgmanager.rgAssignL;5 S8 M# b+ X$ P" M1 [
                        row := assignLObj.getRowNo(GlobalDistObj);) |& @8 O0 H: n7 ?5 E
                        if Row = -1 then -- since 70
4 W0 `1 W2 g, `3 j- |9 M# }' u                                if lan=1 then
9 r+ O# e( {. {( j+ O9 t# O                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  }/ K! }* u, A/ B9 E) p
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 B( I, Y* q) h" l) N3 h
                                else
4 W) L' H7 ^6 \0 `7 L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 h  d0 j4 |. N" B                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 V) F. Y; y( j# C) F& n' E                                end;% X+ r6 k' Z" x3 p/ @- |
                        else  S, [, P' X. ^
                                @.Destination := assignLObj[1,row];
5 a4 z! X' A  V+ `$ N  l2 ]                        end;                        ; q& K3 l' N, o. ]
                        newDirection(@);
+ @+ {9 o+ I) R                        @.HasOrder := true;
! Y8 G$ a/ Z# R9 F! y: E                end;3 o+ D  x  S" u3 e3 H4 f
        end;3 @6 I7 M% H" X& [5 u. ^! x
end;        -- of the method
4 m& _- S$ n+ u! B8 |
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
2 O6 X) ^3 W) }& ]9 g" r6 [
  I3 C) ?! r) H+ N* e  h这是AGV_putin中arrive的method。
4 }0 l; T+ S( x+ a9 [2 h) u1 y( F' L$ o% x# h6 M( {; }: H
当到达物料速度越高时,这个报警更多,8 S( J7 P% |- V$ O  c) Q5 x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。2 V. l  I6 x0 `; i( [4 N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 T& J0 `' d+ A2 v1 ]1 T1 z

* g: {; S$ T5 u7 d7 h$ `" y6 Z另外一个小建议,就是move,所有的move都可以这样* I' k2 z- I) ^3 q- I
if not move() then debug end: a! j& A2 ]+ P& y2 C0 F
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 p' v% v+ E+ V" Y; [, ~7 m6 x1 g8 I
plant simulation中的free libraries有AGV模板,
2 k' ?( R) ]: {+ z6 g1 K里面也有案例。  O6 }$ L- h, H
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% h1 ~( [/ Y1 ]7 {, _
7 y) W/ c2 u8 A! Q4 Y7 ?* q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: B% I, E( L2 F. `! ?: z% t  d4 D; l: r
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 f+ Y9 a' B5 f* s8 j
这是AGV_putin中arrive的method。/ q) W9 L6 J, A( {
0 S* V. I7 |3 A# `) j7 y
当到达物料速度越高时,这个报警更多,
1 s! s( N# b* b3 A9 |& Y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-2 03:13 , Processed in 0.027397 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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