设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7340|回复: 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'1 H8 q1 L/ ?# L4 Z
*/& S) O& |: g+ n0 a
is8 ]% m$ b: O5 s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) v  f# g: u& ^; ndo
  Y6 @; P, R; f% d        Lan := rootfolder.Internal.Tools.AOLlanguage;. Z, f1 ^# M% O$ A( P6 V3 f3 b
        if current = @.Destination -- else return) G: J3 ~: z' X9 |8 A2 J8 k2 V
        then
# A9 ^0 ?: k$ F0 u# t; C$ x  S                @.Destination := void;2 g& O' `7 c2 @8 G) A) `# n
                if @.occupied then
8 F' w4 O) t; e( _$ f                        part := @.cont;& [2 G9 v! c9 h! Q) s
                        @.transpOrder := void;
0 S0 Q6 D, r! c% @: W( Z2 K6 r$ ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: A& \- \2 k0 M$ @
                                @,root.eventcontroller.simTime);
0 K! G. {% a3 n. W$ @                        @.HasOrder := false;
. L4 O' V8 M. j* S                        @.DrivingHome := true;  b' _  f) m' f1 l2 e& q
                        rgManager.tryToStartTransOrder;
1 A7 H* C- y* ~# l; M9 Y                        if @.Destination = void8 f' O6 ~3 @7 P6 u) N, U
                        then -- no transport order for vehicle @
, l0 }9 Y0 R& H5 U9 H                                @.Destination :=
! B" n2 o( j3 B1 C; |                                rgManager.nearestFreeStation(@,track.~);8 ^6 F: E) w( t7 v8 j8 j
                                newDirection(@);   
/ _8 b4 i" [) t1 B- }6 p8 |! E2 d                                if @.Destination /= void then0 ?8 L* w6 M7 B" _0 V
                                        @.Destination.NumReservation :=8 [5 c6 p% L9 V  j
                                        @.Destination.NumReservation + 1;
$ i: `1 u' \+ n4 Q# m8 J$ R) v                                end;3 l# ?, @9 {, ?" U' P8 \( Y9 J5 y
                                @.CurrIcon := "drivingHome";6 f9 w3 ?, t' D
                                @.DrivingHome := true;
! O! O* ^# }2 Z2 B, J$ a                        end;
% R* B; }( G" G# [$ g% N                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; k, R4 V! M) d2 `
                        part := @.transpOrder;% u5 z6 t3 {$ o# @3 L, o
                        part.move(@);-- load part& l2 V8 q/ o1 r% M
                        @.CurrIcon := "load";5 X* G& b# [. t( {
                        GlobalDistObj := part.globDestination;
* T. w! r; x" r4 M6 ?7 X& W                        assignLObj := rgmanager.rgAssignL;
9 n8 V0 r8 y  ?$ }) w                        row := assignLObj.getRowNo(GlobalDistObj);
+ h6 ~  Q! x* M2 H                        if Row = -1 then -- since 70! u7 L, ^0 \6 M3 P% m, F7 F0 {
                                if lan=1 then# T5 ^) a, X) k. T, S0 a
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 W, [6 d( w7 U! K  [
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; q: @- S* _3 E" `" B  @                                else
2 U3 }* M8 G; _& p  U* W                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ \3 ?0 r! ]9 ]  w' h: S& _                                                to_str("in docking station: \"",?.~.name,"\""));                                : \$ l' Z& o8 C# W
                                end;
3 C/ r0 d7 Q# W" W6 r) {* _                        else4 N! I5 ]8 C% b& E$ z' G# b0 e! Q; s
                                @.Destination := assignLObj[1,row];6 g7 i- E1 P( X  n( m, @1 i. }* A; v
                        end;                        % h9 M7 Y. a& ?: a9 I+ x
                        newDirection(@);- ~2 e9 V7 v6 @3 d
                        @.HasOrder := true;2 e- [0 z+ U; D7 V
                end;! a9 p' W+ e0 h5 J( a  v4 b# ^: f* g
        end;
" F" m* @  `1 ~: I, C5 vend;        -- of the method9 g6 L$ Z7 K+ v2 }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 [  A( K2 M8 R, i

7 p9 _" B& K  V1 g这是AGV_putin中arrive的method。
" [! q' f3 j( O+ J; o3 n
7 {) @% }: W8 k* S- @3 [当到达物料速度越高时,这个报警更多,8 N; f8 ?$ k7 h! z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# R  S5 L+ J1 i' Y8 _. `4 m+ v程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?. \: v4 C$ b: ^" x1 C, t& ?

3 U; U' V- U& v! t7 B; }另外一个小建议,就是move,所有的move都可以这样
& g$ l: C! R) O4 w4 nif not move() then debug end
* V; P" D% t, H2 I0 O( u这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
  m: u8 o3 i* d- Q3 T5 mplant simulation中的free libraries有AGV模板,
: A0 X7 Q! T1 C& b0 d0 X里面也有案例。2 U. o4 @* Z* u1 K+ c8 `( b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ o6 M( e3 D% Q+ c6 G3 V

, @$ Z+ D+ B& Q/ W4 @我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
  N* t+ g4 q7 n. w6 C1 W8 X' L" e/ _" {) n( O' m
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( h0 P6 A% `( S* C% u这是AGV_putin中arrive的method。
, g- e. H) p) B  U0 F
& Q2 z' `. Y0 Y8 G# I7 ^+ u! G. v当到达物料速度越高时,这个报警更多,
4 l& R) d; F+ X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-5 01:36 , Processed in 0.019634 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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