Comments (2)
I was trying to solve a small optimization problem using NSGA2.
In MyProblem.py, I defined the aimFuc function as the following:
My input format is:
x1 = Vars[:,[0]]
x2 = Vars[:,[1]]
My output is of the format:
obj =np.array( [[a],[b],[c]] ) #where a,b,c are integers and the len(obj) = len(Vars).
When I was running my main file, I ran across the following error saying my obj shape is wrong:
RuntimeError: error in moeaplot: The number of ObjVs columns must not be 1. (使用frontplot绘图函数时,ObjV的列数不能为1。)
Can anyone help me with this one? Thanks : )
您好!我分析了一下您遇到了两个问题:
- Geatpy更新的2.1.0版本没有上述判断代码。您安装的应该是2.0.0公测版。
2.在2.0.0公测版里面moeaplot()函数只能绘制二维及以上的目标空间图像。您可以
print(ObjV)看看ObjV是否正常。moeaplot函数要求传入的ObjV是一个目标函数值矩阵,每行对应一个个体,每一列对应一个目标。其API文档可通过help(ea.moeaplot)查看。
from geatpy.
明白了。moea是针对多个目标函数使用的,所以objv应该对应最起码2个目标函数,因此至少要2列。我的情况要使用soea。多谢~
from geatpy.
Related Issues (20)
- HV, spacing 的计算原理
- 请问moea_NSGA2_archive_templet(带全局存档的NSGA-II算法)的可引用文献是哪篇呢?谢谢! HOT 1
- demo3不是01背包问题而是分组背包问题吧
- installation error HOT 1
- bs2ri是如何计算的,源码中也没有找到
- 关于决策变量为小数时的离散化情况 HOT 1
- 开发者你好,我想询问一下关于决策变量关系的问题 HOT 1
- 请问一下Geatpy什么时候支持Python 3.11呀? HOT 9
- 变量强制修改问题 HOT 1
- 【重大bug】call_back中,Population.save()与直接写成数据,完全对不上!!! HOT 11
- SEGA回调函数self.outFunc有问题,之前NSGA中并没有存在该问题 HOT 3
- 每代的结果输出
- python 12去除了 gil geatpy什么时候跟进呢
- 希望提供GPU加速功能 HOT 3
- 明显有可行解,但优化失败。 HOT 1
- 想在循环中调用geatpy,但每一次循环的目标函数参数不同,我应该如何将目标函数设置为除了决策变量之外还能传入其他参数的形式? HOT 1
- 开发者您好,我正在做一个多目标优化求解的问题,希望使用多进程提高效率 HOT 1
- 面积覆盖优化可以解决吗 HOT 1
- 开发者您好,请问是否有办法执行问题并行的求解? HOT 1
- 帕累托前沿只给出了一个解怎么解决 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geatpy.