设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8815|回复: 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'
$ B7 w  ?: B/ L: Q*/1 F; o/ f" H+ j; `$ o
is: \# T8 R6 g& E+ n9 e8 b: u
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; }2 I/ y" _) ~" ]do" t+ P! U7 y- ?: f5 y7 W7 q0 c
        Lan := rootfolder.Internal.Tools.AOLlanguage;; `6 }. {' L! J) i, _
        if current = @.Destination -- else return& w9 t, I8 g6 ]
        then
* H& S! H1 L( G. F  x% \; F                @.Destination := void;9 \; g- M: ?: i4 o$ f
                if @.occupied then. \5 \: F9 l& k/ z
                        part := @.cont;
1 L& n7 {& v" o) K                        @.transpOrder := void;
0 X4 f+ A4 s# V, S' f                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 K$ |6 H% n7 J# j3 h& ]$ c
                                @,root.eventcontroller.simTime);, _" G: P$ g! J2 f: ~
                        @.HasOrder := false;
& j+ f( I: h5 h7 [                        @.DrivingHome := true;
: F8 Q* ^" m: J  A0 ?                        rgManager.tryToStartTransOrder;2 w' S# A4 e5 a6 o# a
                        if @.Destination = void/ w7 f) F/ e, S% B  S9 Y
                        then -- no transport order for vehicle @! l0 |8 J1 K+ q* f/ h9 M
                                @.Destination :=
# g+ g) F+ n/ m6 X6 e                                rgManager.nearestFreeStation(@,track.~);# n/ r' N9 j" C) C/ q6 ?
                                newDirection(@);   
7 ~8 d( ]7 V  Z, K                                if @.Destination /= void then* p2 j; h7 I' V# Y
                                        @.Destination.NumReservation :=
: t& U) E* M6 |6 A! X. o                                        @.Destination.NumReservation + 1;
  O3 {' F5 E; `( l* |2 s$ {3 v                                end;  J, l9 Q2 w2 E& ^0 K7 W' N
                                @.CurrIcon := "drivingHome";
6 t; [1 X$ I1 U! v                                @.DrivingHome := true;( {8 z3 p- J" s1 {
                        end;* h; Y/ ~/ O# Z) d: {6 k
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ?' h% Z( P( x$ D3 F3 {: {8 s
                        part := @.transpOrder;; }% B4 A, }; M! C) L( C& n* L
                        part.move(@);-- load part
$ h6 q8 v+ E9 Q* f/ P* m& @. I- d# a                        @.CurrIcon := "load";
6 }- a' ~- m" T0 n% U" m                        GlobalDistObj := part.globDestination;
1 X  ~4 h& {" d7 E3 o- b                        assignLObj := rgmanager.rgAssignL;
- |' J8 a* c/ c: Q; H& e$ z8 f                        row := assignLObj.getRowNo(GlobalDistObj);+ T6 J# ^& w3 a4 {0 p
                        if Row = -1 then -- since 70* {( e( j' s' ^0 P' b
                                if lan=1 then
) I% V* f) n- ]0 l- w& i( b/ [9 J5 X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 |0 _. e  V, }4 U. I* [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
% @5 A' K& l. _: D# _                                else
/ [& C7 N- t7 k' Z; h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 B- ~* S" p" E" H7 m/ n
                                                to_str("in docking station: \"",?.~.name,"\""));                                ) y2 {$ v9 ]$ `8 G. ]; A
                                end;% e& {- n$ C. x* p7 f7 `: Z
                        else
4 c: R3 Y+ f& g                                @.Destination := assignLObj[1,row];& G  S2 j7 i9 V. F
                        end;                        ! j  x- b! @- l$ j2 d/ Z( r
                        newDirection(@);
! f; u! o+ U9 _' o! z" v                        @.HasOrder := true;
# D/ H: B1 M9 [: E4 A9 {                end;
1 b  E: d, U, N- o        end;2 [, e# S$ Z3 P" Y
end;        -- of the method
9 o! b' }* z  Y3 ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- e) U0 z% X8 o  B% X9 k2 c. G1 r/ l
& _1 m4 l! ]& O4 `这是AGV_putin中arrive的method。
4 x8 F  T; C4 ^' M& O2 |8 ^
8 \9 e* W1 h' j; Z5 \, ?5 X- i9 A当到达物料速度越高时,这个报警更多,
# F% @* l! _/ {* z可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  q- H1 t. T# G" y* A  W$ ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& Y9 E1 B2 F% c: ~7 |* Y8 j/ \4 s
另外一个小建议,就是move,所有的move都可以这样7 K# J1 m! a0 x% N
if not move() then debug end; s5 T, ^5 X3 D) ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! `  S* N$ u+ I- L
plant simulation中的free libraries有AGV模板,3 [" s+ M$ G7 a/ G- r  h
里面也有案例。
! i9 W: {% H9 d+ M% u我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ }' ]. [- P+ s- B# ^( x% G- S2 `  p  F* u
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! ]' T! }+ a2 S1 t6 P9 r

* ~1 L5 x9 H8 u; H8 t那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ }7 Z; w3 s5 @- P, n# {这是AGV_putin中arrive的method。  [' o* }' [5 x2 P& |

; a2 z3 `, q5 {5 S2 o, P# R当到达物料速度越高时,这个报警更多,

; G9 T' |( ~" _( L5 z另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 00:29 , Processed in 0.025411 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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