设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8597|回复: 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'
  V( L- ?% b1 t! A0 ^*/4 _- v& I) m  k$ _" {" B0 ]* _* b1 c
is& _. H3 J/ v1 e2 H  F0 g& _6 s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) `3 \, |+ D* L$ P6 O( q6 \( fdo
. ?3 ^- E2 N" c) u% `! J4 m        Lan := rootfolder.Internal.Tools.AOLlanguage;) e( O0 I" C5 x6 @  f% A
        if current = @.Destination -- else return8 j1 T. s1 F8 x: I
        then5 F# `5 e+ S+ g9 N' p  P" x
                @.Destination := void;4 D8 Y" P) N3 [' B7 }1 U7 @
                if @.occupied then
( v- U7 ~  w) \" {5 m                        part := @.cont;' {, |5 P! ]1 b* P* G  m: P8 z
                        @.transpOrder := void;) Y5 p! y$ S+ p* ]$ f0 I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: @. }, |% }8 T4 @3 Q: v
                                @,root.eventcontroller.simTime);
+ {2 T& q. @9 p+ A0 L                        @.HasOrder := false;
, M& H" H1 f7 z. }4 {1 Y                        @.DrivingHome := true;
6 d# l* p) d$ t0 H0 `1 X                        rgManager.tryToStartTransOrder;! A9 V- a' e# i0 S
                        if @.Destination = void5 C' Z. }8 n0 x$ \  b: |5 o
                        then -- no transport order for vehicle @
: c1 D4 f! Q& g4 K5 {  i                                @.Destination :=
, g, r5 x3 g3 F" O                                rgManager.nearestFreeStation(@,track.~);* M7 q. x; ^% d, N
                                newDirection(@);   * W  h) n; x1 r2 j" z4 ]+ f: R
                                if @.Destination /= void then' W+ ^. A# ?) \7 h
                                        @.Destination.NumReservation :=2 A+ K; Q+ H( R' J9 e6 `
                                        @.Destination.NumReservation + 1;' K, T$ C5 s: w" b7 f& G  ~8 A
                                end;
2 T! I7 p: \8 i$ e/ n                                @.CurrIcon := "drivingHome";
" a: E5 o' r% f* M                                @.DrivingHome := true;
0 a0 k0 A$ i0 @- |6 X1 g                        end;; @- L; [2 N# O1 n* f+ k
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% V( J  `+ q; s/ r* G% A                        part := @.transpOrder;8 b0 S* F( X& c$ u
                        part.move(@);-- load part4 e- P2 k) x7 ?
                        @.CurrIcon := "load";# t" {0 r1 A& ~1 U: H2 M7 L% _* \) M3 z# N
                        GlobalDistObj := part.globDestination;+ i, t0 l* A2 {3 ~3 d0 I; \
                        assignLObj := rgmanager.rgAssignL;; m- T8 B1 ?0 Y$ D, c2 n
                        row := assignLObj.getRowNo(GlobalDistObj);
! X1 C0 G8 h0 R/ J                        if Row = -1 then -- since 70& S+ Z- {/ T( ?) K2 w6 T
                                if lan=1 then: E* {1 c8 b8 F# v) {
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 H0 }7 y  `! d
                                                to_str("in der Andockstation: \"",?.~.name,"\""));. Y% F# @3 P1 k3 l
                                else
* ~# O, @+ ^. E* X                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& `/ d2 L% T) T. z& q# M4 W                                                to_str("in docking station: \"",?.~.name,"\""));                               
; B6 D; e7 C% Z$ N2 {! Q" X1 `% `                                end;' Q' k9 p/ b: [" i  K0 G
                        else
  N/ j: r; y) }8 M1 A% v2 f. r                                @.Destination := assignLObj[1,row];
0 E+ z" X) b8 n5 x                        end;                       
  X' E$ ?& J! L2 b                        newDirection(@);
7 {  s* m* L; d$ J1 p                        @.HasOrder := true;* ]# f) ~8 ]/ m+ t! K8 e% a: U2 N
                end;4 B$ c6 K) J) m+ i& p% U! h0 L
        end;8 Q( o0 W. e. X5 R/ w
end;        -- of the method
9 n2 e; _* m0 i3 h! T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . V& B' U2 A$ G# G
% K  e7 `8 E7 m. |" M
这是AGV_putin中arrive的method。) \: R; M6 h  H) T# _. O! A/ c
$ _+ ~# }) q: U( ^
当到达物料速度越高时,这个报警更多,
( e2 T. B( |  z" z) u( w) Z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- s& f; S1 y. a; \0 N& s: j& R3 O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 X! @: N4 T9 H4 F% ^7 Z* h$ a$ R4 _
, S- `2 M7 b: d1 W$ m' u另外一个小建议,就是move,所有的move都可以这样
& Z- R5 U) K/ @& H/ uif not move() then debug end
! p9 d; t0 g+ p4 N1 T( j' }; p这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; L0 k3 w  o! l  E" \0 lplant simulation中的free libraries有AGV模板,, b! t# ^6 o) d1 ]* S8 A. d
里面也有案例。
  D. ]+ h0 v0 I! p5 K4 L; }+ i) [* D我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( A: o5 d" ]" F9 J
1 _5 W* O" q" b! ^4 U" H' E8 v! l我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; u; I2 w5 Y; M
/ G- W; @, H" u- z1 A3 P那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 }, }. [9 O6 M! V# }
这是AGV_putin中arrive的method。0 R* p  S* f/ k+ y
8 `! y2 t$ S% e% F) I4 k
当到达物料速度越高时,这个报警更多,

1 u3 ?" f, C" m7 `. o* i' b另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-14 17:18 , Processed in 0.013678 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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