设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7568|回复: 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'$ z! z" b  W- G/ J) l
*/- S$ q0 y$ O" e0 g2 l1 p
is6 Y  e, S4 z- R+ t: ^
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 }$ G5 O: v/ [% k5 ^" R/ Fdo5 N/ d$ j, p4 U; h! ]
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 e6 N5 B) `4 U        if current = @.Destination -- else return7 p5 z( ^! |- G
        then& a3 V# i& W9 v
                @.Destination := void;; Q, ]6 M5 c9 Y0 K8 S0 R
                if @.occupied then# g/ N, t2 T5 ^& I
                        part := @.cont;
" Y& p$ [1 H+ g) s8 ^5 \                        @.transpOrder := void;
  Q& W5 C% l3 W( o& Z" ]                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* l' L  L7 p8 o8 T; i                                @,root.eventcontroller.simTime);
; c* `3 o, |# n  ~                        @.HasOrder := false;& O4 _* r) S9 ], I
                        @.DrivingHome := true;
4 m( X; _7 _0 z- v9 ?1 @2 }& C1 ]                        rgManager.tryToStartTransOrder;' l3 r. b. [2 z/ c
                        if @.Destination = void$ K- `9 u: l( ~/ ^0 q7 U7 [
                        then -- no transport order for vehicle @+ q' i6 L0 ^+ J& `2 u" K
                                @.Destination :=6 w! w+ d, Q) G1 v# F" I! q0 o
                                rgManager.nearestFreeStation(@,track.~);. R* f+ A0 t5 u5 S
                                newDirection(@);   1 i8 ?7 }, p; S2 M) G; d
                                if @.Destination /= void then1 G4 I8 z7 a4 S( K+ p
                                        @.Destination.NumReservation :=9 G8 P$ J1 P% g% Z- ~4 w9 B
                                        @.Destination.NumReservation + 1;
& e1 I1 j+ i1 i( B                                end;
' L, E/ _! a9 T; q8 S                                @.CurrIcon := "drivingHome";/ i* w  h5 d2 Y+ Y6 ?
                                @.DrivingHome := true;
! w6 l% x' g0 c& ?% M. }                        end;7 I. a  W- \3 Z8 K' P
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Z# I( w) D" W( G; k3 k' j$ i                        part := @.transpOrder;. l* w1 t; Y5 x6 {2 ?1 j" o
                        part.move(@);-- load part
4 H4 H% K  m' k4 C- J% f                        @.CurrIcon := "load";
; R6 D1 E( a: R- C                        GlobalDistObj := part.globDestination;: H& X3 D  g3 y8 Y1 {' p, U% B
                        assignLObj := rgmanager.rgAssignL;
  u7 ?2 m& V) e& c4 d' Q                        row := assignLObj.getRowNo(GlobalDistObj);4 f1 U+ p" i; F' A* m; Q
                        if Row = -1 then -- since 70( b3 C* K2 M( s6 z) o
                                if lan=1 then& h) ^  F4 k5 g7 Z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! u& r, J) ?  U, y0 a# j
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& F% ?3 l9 v1 Y" Y" n                                else
+ Z7 V0 M  b: E& n, B* N) P4 [                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 m* k; ~; C' \7 ?' O  o9 q" x
                                                to_str("in docking station: \"",?.~.name,"\""));                               
& f  ?' j4 R' b8 g0 J                                end;4 G" y/ o. h8 [. I+ g! u8 S( R; d
                        else
) L4 w* W5 G* m" M3 N/ B+ K                                @.Destination := assignLObj[1,row];, I9 B$ |+ M3 r# Z: ?) M9 g2 x: t) a
                        end;                       
3 \. Q# ~, o7 M. G' a                        newDirection(@);
& C9 n* x! e' }                        @.HasOrder := true;
* P' R; k# T* \6 Q! {7 ~9 r" ?& l7 f                end;5 V/ \, l3 ?+ _* M' D/ s8 {1 Y3 l
        end;, G8 @3 Y8 y3 x# t9 t
end;        -- of the method
; Z" E7 m" b8 ^! ^# d# l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑   v4 z: }" u* X# e' i/ n* e
# m: W' G: ~1 t+ o+ J" o. |
这是AGV_putin中arrive的method。, Q) x$ @2 K/ _  E. ?+ O& H

8 X! G! E9 t+ r当到达物料速度越高时,这个报警更多,  D' v. a3 T& E; U! D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; b/ L3 l; H4 A0 p$ U4 s
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# j9 S: j' u6 I- H+ z
% J, \  Z/ c+ @  i0 `% r
另外一个小建议,就是move,所有的move都可以这样5 B; ^$ {) h2 D$ n
if not move() then debug end) l  }! Q+ i! C2 ]/ j5 Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ Y' u$ l  e3 Z. {$ u0 m: i% L# r( ^
plant simulation中的free libraries有AGV模板,% L; q, Y, ^* m
里面也有案例。
$ Y3 ]3 E" B; }+ d# [( P$ X我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 D9 ~5 I# e/ F( N
" }6 G% p- {# k4 v我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / B: I& ~0 B/ v# Y9 R
0 ^7 V$ z- K' X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* e) P. H4 I0 n2 W  ~这是AGV_putin中arrive的method。
% P, l) [1 h2 U4 p* N$ {! O$ s: a4 p
当到达物料速度越高时,这个报警更多,

, Z- `' @" Q% B9 W8 v) ^另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 23:30 , Processed in 0.018410 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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