设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9935|回复: 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'
% Q: F# A$ V2 C/ X; A*/
0 s3 V/ x9 S* ~* \/ v8 ]2 a9 Fis
; W+ Z; x& n  \, t9 |6 Q! `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& C/ e* n8 k& l! m$ e% b" Fdo+ b4 u: @9 o# W6 J" j
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 A7 |! D4 x- O" ^9 `, O        if current = @.Destination -- else return
$ m" d7 l/ \3 \4 T/ v, a        then
& q% t  `" T4 f( c: Y& g                @.Destination := void;
- r( z% `; c* K$ G' ]$ E3 e0 B                if @.occupied then
+ O0 O3 @' \- f0 K0 R                        part := @.cont;
, B% P! l4 C' ]% {' w                        @.transpOrder := void;
# b5 b% N% k; V* b  N1 y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ]% K6 _3 L* |! G0 K; V1 ]7 ?* j                                @,root.eventcontroller.simTime);4 `) U# d7 r+ ^# X3 g: M
                        @.HasOrder := false;
) G. k# W5 J3 c+ S                        @.DrivingHome := true;+ {1 w5 t3 e8 D* D1 R! f9 L0 u
                        rgManager.tryToStartTransOrder;% m, d6 j; H% T5 u$ B/ \
                        if @.Destination = void
7 ]( r+ s& m5 X. T* k# u+ u! W                        then -- no transport order for vehicle @  U) K+ e9 ^  L  D5 ?
                                @.Destination :=
; O4 U# Q- l; q/ \" s1 W3 H                                rgManager.nearestFreeStation(@,track.~);
! V( I& G) E8 H- E7 I% u                                newDirection(@);   , h- g$ E# W" Z7 D1 a" T1 ?
                                if @.Destination /= void then
% |  p7 U. G( K9 ?. H$ x4 b                                        @.Destination.NumReservation :=4 n9 `( n5 @+ r
                                        @.Destination.NumReservation + 1;7 f* _  O' \# k, T* T
                                end;7 c6 {/ t* z' E
                                @.CurrIcon := "drivingHome";6 F6 e+ ?' p' P7 A" t3 k# \( i" E
                                @.DrivingHome := true;, y! k+ E5 P, B0 g7 `8 R. n
                        end;
% q( J- a  P3 T% |4 E' _# R                else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ^" r9 h* A* C/ N3 n8 d4 {
                        part := @.transpOrder;
: p9 E: C- }/ @                        part.move(@);-- load part
8 a* o. e( a% `$ F4 h                        @.CurrIcon := "load";
% e% C1 _5 F( O- j' o                        GlobalDistObj := part.globDestination;
. r; O: E  G2 F5 m! [# ~& v6 @: [0 k                        assignLObj := rgmanager.rgAssignL;  o" L; e3 X9 o& Z
                        row := assignLObj.getRowNo(GlobalDistObj);
0 l: ^0 F# C2 g2 _! `7 _; B                        if Row = -1 then -- since 70
6 b  l* Q  u. x0 Y. A                                if lan=1 then0 N8 Z2 a* _+ f. A7 x/ I
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; h/ `  h% h- x; G. d$ V9 t                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ N; u; _9 u2 Z0 D9 S) T- E
                                else
6 M: B5 z1 p; x! {1 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# b, ^) ~  I# }! R* B1 ]/ r
                                                to_str("in docking station: \"",?.~.name,"\""));                                * j$ |# W4 c/ i$ i" J$ C3 N
                                end;& a# M8 r& i. s
                        else
4 e+ x& Q$ ^6 c$ @% T3 H" }1 \                                @.Destination := assignLObj[1,row];* D" Z: o8 [2 I
                        end;                       
5 n& Z$ e: h4 ~- ?" a# ~8 ]* t                        newDirection(@);
. [$ B# L$ b4 ?$ u( M* G                        @.HasOrder := true;
* {) V3 l/ q8 V7 V) u) Q                end;
4 }  ]; _2 u$ c) y; O        end;5 M2 b/ s$ U/ S! Z0 \
end;        -- of the method( Q4 Y7 T6 E: d: p, [: l% [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: ^* B8 k1 T0 D+ ]3 `/ j
- X/ l9 N, c, O  I, _3 r这是AGV_putin中arrive的method。
0 A8 I! W4 I; X- L& `& e0 A
) f1 J3 y, I- [( B* G当到达物料速度越高时,这个报警更多,% T! H& `+ v6 Q2 n2 {
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  d. W" U. L! H/ C: ~+ U8 e! n程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ a  G; b! l+ n" o% H3 e

1 M9 W1 D4 K& w6 ?9 r* q# x- G另外一个小建议,就是move,所有的move都可以这样$ S+ [9 u% U( Y+ j& L7 X
if not move() then debug end+ Y$ d3 ~2 }+ [# y& N0 ^3 N3 [+ S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. Z' X- F3 v" F( o0 Dplant simulation中的free libraries有AGV模板,$ b# n6 u" I% z7 r! H8 I3 g, m+ |! V
里面也有案例。1 q1 z% f6 k' Y- n8 n+ u1 t
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 C- d" _) \& l3 I8 V) o5 j6 S7 q& f0 Z  S8 L) Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : S/ s" R3 S3 R

( M, {. w1 ^; |7 l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 [: b3 h  k9 I( K  X% Q% Y$ e
这是AGV_putin中arrive的method。
; |4 C) d3 z/ k" N. e2 J' Q1 F" _3 `8 p
当到达物料速度越高时,这个报警更多,
; B! U% F- _) J) I
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-3 05:58 , Processed in 0.016932 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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