设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8479|回复: 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'
. i6 h( A: I8 v% l1 u/ m*/
' a/ N' V- e0 ^- Wis2 z# S9 Y3 F  s* ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% @" L' E* w3 z* q9 V
do
* s) O4 @" g5 g        Lan := rootfolder.Internal.Tools.AOLlanguage;) B; l$ j! j3 d+ F
        if current = @.Destination -- else return
7 o/ o# I- u: Z4 C1 e# Y0 w% Q        then# G1 A% Y( ]0 ~% n6 ~
                @.Destination := void;) [+ r# {: l% d4 @* L
                if @.occupied then
  \% N& k" n8 p, I                        part := @.cont;5 S4 P7 C$ D- i* V# Y8 T
                        @.transpOrder := void;9 }8 c. V, }, i2 c3 D- I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& c8 S5 w3 R6 ?$ s4 s% l5 B1 U5 B
                                @,root.eventcontroller.simTime);
6 |7 n# N. C6 @                        @.HasOrder := false;, r5 O: @2 B$ ?
                        @.DrivingHome := true;
1 f: O4 N) `" }( |                        rgManager.tryToStartTransOrder;
: X$ X. F5 U$ L. q, ^) e                        if @.Destination = void
7 i  c# S8 H3 V* [$ s3 P4 D$ e8 l                        then -- no transport order for vehicle @; |$ F" A/ s+ b; t! v8 H& p- K
                                @.Destination :=
' b- h2 b* m. R7 O5 Q* Q4 P- z2 u# l                                rgManager.nearestFreeStation(@,track.~);
( B! d. x9 L- V6 c" a. i. L                                newDirection(@);   
, ^' F$ G9 g3 E; \( q                                if @.Destination /= void then
. \$ z" ^- r) F; [                                        @.Destination.NumReservation :=
8 I# m) i  S) A# |0 l9 {$ w/ o                                        @.Destination.NumReservation + 1;) x" C3 I+ W. {1 x  u
                                end;
: b2 T7 z/ X/ L8 ?" ^0 W- B                                @.CurrIcon := "drivingHome";
! n5 t' w& a8 m                                @.DrivingHome := true;9 S* u  i7 j: Y) }( S
                        end;; k% v2 }0 i3 x( p7 S9 W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# k* ?4 H3 E9 P                        part := @.transpOrder;( G, a8 y3 M9 J: p1 y- @
                        part.move(@);-- load part  F$ [% f4 P% O4 B
                        @.CurrIcon := "load";
* t3 o1 ]' h& p7 [0 ]7 @                        GlobalDistObj := part.globDestination;
7 Q' a0 q$ Z) \5 I; ~$ D, h& @4 F3 L; t                        assignLObj := rgmanager.rgAssignL;
6 x4 `% \3 H) }7 b0 p$ w3 d  l                        row := assignLObj.getRowNo(GlobalDistObj);
+ m( I  l" `# F( H$ Y8 K                        if Row = -1 then -- since 70: Y7 T, D3 C2 W# y4 _
                                if lan=1 then% c# H0 M' l2 l# E
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! _% T- _  W9 T0 w7 M                                                to_str("in der Andockstation: \"",?.~.name,"\""));
4 v- S% d5 C2 A+ p3 t& l, X7 O" T* m                                else8 z* B, G8 q2 Y0 J1 e+ {
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; c' n8 \' F' G$ S# U* I/ c                                                to_str("in docking station: \"",?.~.name,"\""));                                  w1 f2 S- c$ P' U& `3 [' ^1 N
                                end;7 \1 \/ M. T( s# d4 [0 M
                        else
! s2 N5 V' e  I3 K                                @.Destination := assignLObj[1,row];
# s5 G6 ^  i4 A& |: E                        end;                        0 v' W& f) {! W9 L1 V
                        newDirection(@);9 b% |6 r) p$ G- y% W' w" a
                        @.HasOrder := true;
3 k' ]4 t% N' f* Q                end;) f7 e( i3 H4 Q; f/ \! c
        end;
/ i6 K$ J& p0 m/ P  h! v( ]4 Iend;        -- of the method' r1 O$ E! F. S% J
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) U& N3 R9 c: |" h% f) y
' X) T/ Z, X+ M
这是AGV_putin中arrive的method。( b+ [' V+ o  R) T# [0 g9 v

2 C1 ?4 M1 p" }$ z当到达物料速度越高时,这个报警更多,
  p& R' n* M, d, S) S3 J# L可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' W; P" h8 T6 a6 M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; F" C) z! A8 K! R% W

% ]& G- |  y) ~* g. Y另外一个小建议,就是move,所有的move都可以这样
: H; `$ J2 V$ Hif not move() then debug end' o7 L/ V. K. w8 i0 R$ l* q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ g4 f$ h' J: X' W  Y2 ^2 e5 y
plant simulation中的free libraries有AGV模板,
/ T4 B$ E2 E* }里面也有案例。7 R4 q7 ?5 D$ y& F9 O0 S( ?) N
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; \, Y" ?8 J8 J; t" O

8 Q  o0 S& v5 M, B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 r5 R  T" v* c) x( Y9 O: g* n+ i9 p% s# \
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 w; S/ \  B0 J; {7 V6 O
这是AGV_putin中arrive的method。
% P% H' O: M0 N+ U8 z3 b
9 W5 a  y, M5 }# P/ p$ f当到达物料速度越高时,这个报警更多,
5 y- B: s6 p3 b6 r$ a/ ~
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 12:36 , Processed in 0.018342 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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