设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6244|回复: 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'% D+ X" i9 K! K5 T
*/* ~$ d  n8 k( z1 N9 {$ T
is
" p. X! V% }# U6 S4 M$ b2 B        part, GlobalDistObj, assignLObj:object;row,Lan:integer;. u, x' g$ L/ w+ F
do
9 f+ Z) S4 L9 d% C, Z% W6 A        Lan := rootfolder.Internal.Tools.AOLlanguage;
5 g" z) V9 P( ^! Y        if current = @.Destination -- else return
) l* r) ]4 N" G; `        then
8 s% ^9 a6 Z0 S$ I' ?                @.Destination := void;/ Q* K% g% U( u6 b
                if @.occupied then0 m/ _5 V# q- M/ F* ?' R$ y
                        part := @.cont;5 }4 Y0 a% k! r! S! A, o/ F+ I
                        @.transpOrder := void;
7 f  I- X$ Z. Y5 A% x+ O3 B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 l/ n. `  p" N8 f                                @,root.eventcontroller.simTime);# W. |: j* ?8 V) T: m' W- c
                        @.HasOrder := false;7 i# w( E  Q4 L6 j* W
                        @.DrivingHome := true;+ _! J) F/ n$ ~% p% K1 F) K6 ?3 R2 e
                        rgManager.tryToStartTransOrder;9 c5 o0 C* B+ L9 f2 t0 B% H+ N1 r
                        if @.Destination = void
3 z8 c& t4 \- ^% O( F# y2 o* G                        then -- no transport order for vehicle @
6 N  {9 n4 B; l1 o2 S                                @.Destination :=8 g! }5 W1 d1 C, _% z) h
                                rgManager.nearestFreeStation(@,track.~);
6 [. b) x" x$ ~$ l6 I5 M: x5 c                                newDirection(@);   
0 g- z9 P7 K  b' [8 K                                if @.Destination /= void then- C" g" w' D3 u, f& `0 ^0 A1 r
                                        @.Destination.NumReservation :=4 {5 p, H0 P6 H3 I6 b2 h
                                        @.Destination.NumReservation + 1;
9 a/ s- H/ Q5 r8 z, V, `# \! J                                end;+ j: G# Z! {: J) H* m
                                @.CurrIcon := "drivingHome";
, ]) O+ Y, y' @5 h                                @.DrivingHome := true;5 N9 O1 e1 j% l# b/ J* F6 Z1 h2 W5 n
                        end;2 s5 }/ s0 K; L9 ~+ ~; d
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 }  x2 q* v& C# k6 d9 n0 H5 b( P                        part := @.transpOrder;. s* Z- d: c5 K* T# q; Q
                        part.move(@);-- load part7 x. ~- C* d- Z& m$ d* j; m
                        @.CurrIcon := "load";
" a" O" |& u, ~9 y6 }                        GlobalDistObj := part.globDestination;
! }. P2 B: X/ Y' @( W! [                        assignLObj := rgmanager.rgAssignL;0 ~& p  \* s/ E6 T9 [
                        row := assignLObj.getRowNo(GlobalDistObj);
( Z. \  o4 }( U2 j. T                        if Row = -1 then -- since 70
  C! o6 |* r6 q* A  A9 G* l4 U                                if lan=1 then" m- _+ I5 `1 w8 i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! t3 ]; Z3 ?5 H" {- n) C! y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, t/ Y; J8 Q! [/ s7 }
                                else: B. j. D; o2 M/ d* f  U) ]* q% D. ~
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 x7 {4 M0 i, Q. o# t2 w0 u0 |
                                                to_str("in docking station: \"",?.~.name,"\""));                                , y- n7 _. h) w& {3 h* {& n* h
                                end;* p2 e' }3 j6 p& x) h  N% K
                        else
8 p) ?7 A& X6 I4 x0 e1 u, H                                @.Destination := assignLObj[1,row];$ f% b9 ~% ^1 n9 W1 {
                        end;                       
1 p- `0 V& i; x# ?                        newDirection(@);5 ?- i  \" v4 J' `9 y
                        @.HasOrder := true;5 ~+ U: v: [$ V! B( ?; T
                end;
; G* U0 H* R: K! J* B( d. `, `        end;
$ ^7 Q+ `9 g+ ^+ ^end;        -- of the method" e+ z9 e* J5 i7 d$ N8 Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - ]7 R. s) G, L, d, {; H
0 S9 T. m+ q& X2 S/ E+ T. C
这是AGV_putin中arrive的method。
$ f8 R' Q9 k$ `. t$ ]& ?* v6 \% Y! m# L
当到达物料速度越高时,这个报警更多,
. j) I2 x! a! Z1 @  x$ k4 b可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ b( Q* B& y2 K" K/ u  d程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- D; B2 s$ P) v. ]; |% J6 N4 l+ [, |5 \! `5 \4 M" T
另外一个小建议,就是move,所有的move都可以这样
1 L- ^0 v% c8 ~2 Y5 \if not move() then debug end, `& N. w, Y: o
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: n7 L6 K3 K8 ~! E! `' ?+ uplant simulation中的free libraries有AGV模板,
5 _2 v+ g+ |1 L+ Q里面也有案例。; d& v7 t. r* u
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 H3 e* h3 \% H
2 a! o) Z0 Z8 Y- O
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 ~; ~; c+ ~- Y) U% ]

/ i! j4 z  r# v0 [! T7 S8 i  S% O' X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# `$ F' T; d7 e" L5 z这是AGV_putin中arrive的method。6 v4 ?. E; e* _) T0 C0 i

' j% x/ U* I6 E; Z当到达物料速度越高时,这个报警更多,
% S- V& W5 r, Z. ]" f  I+ B; R0 _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-26 20:53 , Processed in 0.016316 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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