设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7742|回复: 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'' G# v# N8 {9 ?& C5 B* c
*/
  N, b& B, {0 H& @is+ ?$ t# G- s, ^0 N8 h7 I! ~8 d6 L+ ~
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% K# A# ~* o1 n" ^" p1 z6 J- D" vdo
& T! K9 ^2 D$ `/ C0 N4 t& `" [5 t- U        Lan := rootfolder.Internal.Tools.AOLlanguage;
7 w( m8 p- V0 ?        if current = @.Destination -- else return1 X  V- O0 n! W5 V2 t4 }4 ~
        then
% f' i3 m3 x+ E5 V% v- \5 `                @.Destination := void;
; w( j+ U1 O9 `                if @.occupied then
7 m* v7 e. l0 m% F% m1 |( O$ G                        part := @.cont;: y: I$ Y# `2 s2 N9 F1 C
                        @.transpOrder := void;
4 k; D% I: b! E" d/ U0 b6 d                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 h; B5 L& o2 U
                                @,root.eventcontroller.simTime);- F0 M  x- R' p( G0 b' a3 o4 e
                        @.HasOrder := false;5 R) {/ I  |+ V6 h
                        @.DrivingHome := true;
* b$ }- H! g3 A0 P  n; B, ?                        rgManager.tryToStartTransOrder;  Y: m! ^4 M2 K& _1 z# \4 Y: O
                        if @.Destination = void1 e* \0 O/ |, m1 m6 S( z
                        then -- no transport order for vehicle @1 h- l- E) X% o+ V. v% {: _* ]5 z
                                @.Destination :=
% B9 B7 M+ _  E, E8 O' y! O+ c                                rgManager.nearestFreeStation(@,track.~);: {8 P4 T7 y- _4 M
                                newDirection(@);   
$ b2 x# {+ H( p; }, V                                if @.Destination /= void then
2 _$ {: ^; d  K; M0 ]" S9 G                                        @.Destination.NumReservation :=, n+ M4 i+ K& h) k& t
                                        @.Destination.NumReservation + 1;
: a; l9 d3 }6 K( B; ]                                end;
, T; Y* E$ G+ W  W                                @.CurrIcon := "drivingHome";$ J* j4 l& z* t% R1 C
                                @.DrivingHome := true;
& z8 B9 ^9 i" q; a                        end;
0 T+ S) H8 @" S# b9 N                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ h8 T; y9 ^$ @                        part := @.transpOrder;
$ J2 o$ y0 v! u: L                        part.move(@);-- load part9 o- g" p4 s6 r
                        @.CurrIcon := "load";
" F6 E. S/ C8 ^2 ~* ^3 Y6 x                        GlobalDistObj := part.globDestination;: V4 X9 J1 w" l3 X9 X
                        assignLObj := rgmanager.rgAssignL;
9 T3 ?# Q( v/ T) S- L4 k( l0 W1 x                        row := assignLObj.getRowNo(GlobalDistObj);
3 f$ N3 d6 v$ J                        if Row = -1 then -- since 70
  v% k3 u, c! y# X                                if lan=1 then3 w$ v% F( [0 x# S/ q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ i) V5 N/ i- |4 ?/ C) f) @                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! j" J  I- @) c# s& q                                else6 B  t% n; p, \* @0 t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. c3 H6 ?% ~9 \( R; D  }) b                                                to_str("in docking station: \"",?.~.name,"\""));                                $ w8 d- j3 v5 ^
                                end;
% c; \2 e2 u6 A1 G( @4 }& t  D                        else/ a) q6 M: Y$ w; Q
                                @.Destination := assignLObj[1,row];
' S. K8 U7 X* j                        end;                        - v! d/ o, d5 ~2 @; b
                        newDirection(@);
  _" F! R6 a5 ]% n* s; y                        @.HasOrder := true;
. D1 |( A; S6 P  i( x( N                end;( H0 Y6 I: o1 \8 n' J
        end;7 C( v1 N+ _* g. D7 ~2 V- m
end;        -- of the method, W* j. F5 R- `$ H, N% H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 p0 E7 N' ^& n; b* Y
6 G3 Z* k0 ]) T3 @# w这是AGV_putin中arrive的method。
7 j3 b" P: a6 \+ d$ x: k5 n- J; [; f+ e2 p; X7 ]
当到达物料速度越高时,这个报警更多,, D2 u4 I1 X0 R# l9 E0 |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 Z( Y. j# j6 ?; J/ a9 d
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
( e9 i1 Q$ h/ K2 H2 K3 m$ Y1 ]
另外一个小建议,就是move,所有的move都可以这样
; H( i" p- o7 V+ L$ g8 t# mif not move() then debug end
( {0 t7 J9 m/ Q; r& c7 S这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% K5 p* x6 Z8 g1 W% R# ?plant simulation中的free libraries有AGV模板,+ A# E/ _  z1 C9 o: n
里面也有案例。
1 W9 \: J+ H( I2 x0 ]9 c' I% M我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。1 E5 Z2 ~/ {8 }* R6 P8 y" i  g

2 z# }$ m$ a; M( f* w, d$ Z9 u7 I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 0 r0 o6 M8 X) m4 [* Y* S

: X0 m% \& ?+ O: v3 o' R1 y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! ?2 c& n5 {& a, W' T  s& j; @这是AGV_putin中arrive的method。/ p& s, m* ~. H, A7 P
4 y- d5 J7 w4 ~- N/ N- H
当到达物料速度越高时,这个报警更多,
# V0 i/ |( o( e
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-27 05:10 , Processed in 0.028388 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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