设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10299|回复: 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'' f4 @- T; H' K" X5 M- c2 ?! X
*/
3 }% Z8 o6 U  P6 Z2 S# @is3 d+ F6 L7 o9 z/ g: @& v* X0 F! ?
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 J+ t' d# T1 edo3 N0 ~% F" ?3 Z7 ]6 v5 `
        Lan := rootfolder.Internal.Tools.AOLlanguage;5 P; x& `( Y1 H+ G/ c
        if current = @.Destination -- else return
' v2 {# [: H+ q$ x9 R3 V        then
" @8 H% w! v0 e2 ?  ?                @.Destination := void;" r, i1 l& x. E  l7 }: y1 ?
                if @.occupied then
; [& h% F! H. A% p+ z                        part := @.cont;+ e" l3 x" r6 u9 }
                        @.transpOrder := void;  s2 L2 c- T( o- H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 J/ L5 H  o1 }& p' T                                @,root.eventcontroller.simTime);, |* w$ j3 [2 F# b1 O
                        @.HasOrder := false;) b7 T. \+ b& k6 S
                        @.DrivingHome := true;  t& ?% K* I7 b
                        rgManager.tryToStartTransOrder;
. \5 \' T  w6 K* @" ]# E                        if @.Destination = void
: Y) i3 m5 J" h2 \. f                        then -- no transport order for vehicle @
1 y9 P1 }8 t% G$ ?7 g                                @.Destination :=$ Q5 x: I2 A$ w" z8 i1 R  c
                                rgManager.nearestFreeStation(@,track.~);
' C  n" a! U* k2 Y2 r+ O  m% {- R8 L                                newDirection(@);   
3 ~6 \( J( R; t5 O/ U* c% g) I                                if @.Destination /= void then* H1 a/ ]- B1 z8 f  j
                                        @.Destination.NumReservation :=
; x  X) S0 q) x  Y$ ?                                        @.Destination.NumReservation + 1;+ I& c+ Y. H2 p/ t- L8 m) K! p( N
                                end;
7 T& e9 i9 t( n6 N3 T6 z; x                                @.CurrIcon := "drivingHome";
* F  I$ x1 f* L/ Z! p                                @.DrivingHome := true;; L+ p- ]: C# e4 ^
                        end;
) C$ b6 x/ _/ J& g6 A% b                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; P2 a$ Q7 \1 a                        part := @.transpOrder;( R/ y+ ?/ A3 ~$ \" q* p
                        part.move(@);-- load part) w) e( c5 L" n, f% E+ {) Q3 m
                        @.CurrIcon := "load";
7 L  M0 R( G0 a. z& D: }+ a( e5 W# k- W                        GlobalDistObj := part.globDestination;' R# s, w6 Z; }# o+ o8 ?0 {
                        assignLObj := rgmanager.rgAssignL;4 j- }& |9 ~1 Y
                        row := assignLObj.getRowNo(GlobalDistObj);
* \: ^4 ~' t$ i2 l. W2 C  U/ j3 }8 x                        if Row = -1 then -- since 709 {1 @& ^& u0 L! @; R$ n, I8 ]2 c
                                if lan=1 then0 n7 j; N0 b' n. @( T6 V. B
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( _8 l, Q; Y/ F8 e# x                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 W% Q. t/ @2 K7 o                                else
- V. M2 X! P1 T6 u6 P# B! [                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; i# Q. m" D  \* v. q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# F; y8 H4 X( x& W& `                                end;9 Y2 Q6 X! j/ B4 Q& w4 e+ \0 e- y
                        else$ H' w) `" U: g1 k2 J+ M% U2 U
                                @.Destination := assignLObj[1,row];$ P; N6 \4 a, i7 I
                        end;                       
* O/ L- Y! O3 ~# S                        newDirection(@);# h, Y0 Q2 u% q1 L. w" D# u3 W- o( l
                        @.HasOrder := true;6 ^' }: D' s% H( V, L
                end;
. j' B* U# P! O1 T3 \% r+ O1 W0 j        end;
# L7 D$ c9 K' k" N& p( wend;        -- of the method
8 M8 `! V: w. K* l! z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 R6 }. F* L8 p6 g
3 W) V. |* c% j( U. J: Y
这是AGV_putin中arrive的method。
. a1 M( b" i. _3 d2 w) i" M2 P9 g2 d& Z
当到达物料速度越高时,这个报警更多,
* U) @& J( G+ s9 d  g8 w可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
) `/ ^1 L# R' z; B程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?1 N# F* @1 ^2 H8 Q5 _9 [/ L

. N% v$ ?' E# C4 J% y2 P另外一个小建议,就是move,所有的move都可以这样
7 R# {1 v& t. s9 o7 n2 @if not move() then debug end+ T% I$ K$ f7 C; A
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
+ c$ Q( ~9 E- `plant simulation中的free libraries有AGV模板,
2 I% d" T2 M: F; e4 k  X里面也有案例。
1 y9 V# E" \/ d- S; V  U我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# I- j7 L. J7 \2 U$ F/ A, Q8 T1 J8 m" D; }( p% y% G# `' l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . l" Z$ X1 F0 N$ s5 B, ~

' ~  D# c; j2 K' r8 c3 |那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) n, v/ M) a/ e) h
这是AGV_putin中arrive的method。% X- T/ C: V' p: [+ n5 h9 P

# F! R. e- r" ^当到达物料速度越高时,这个报警更多,

& d- a  @* g* F' c8 w* @另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-25 14:36 , Processed in 0.018727 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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