Comments (5)
@fuyingchao hi~同学你好,原官网已于5今年月份停止维护了。现在全部转到了github上。
from geatpy.
新的官网例子在哪,找了半天没找到,请告知,十分感谢
from geatpy.
@xqb-python https://github.com/geatpy-dev
from geatpy.
大佬您好,我安装了最新的2.7.0版本,但是以前的代码运行出错了。我想知道以前的geatpy版本是哪个
最大的改动是:
class MyProblem(ea.Problem): # 继承Problem父类
def init(self):
name = 'MyProblem' # 初始化name(函数名称,可以随意设置)
M = No_opt # 优化目标个数
maxormins = [-1] * No_opt # 初始化maxormins(目标最小最大化标记列表,1:最小化该目标;-1:最大化该目标)
Dim = No_var # 初始化Dim(决策变量维数)
varTypes = [0]*No_var # 初始化varTypes(决策变量的类型,0:实数;1:整数)
lb = [0]*No_var # 决策变量下界
ub = [1]*No_var # 决策变量上界
lbin = [1]*No_var # 决策变量下边界(0表示不包含该变量的下边界,1表示包含)
ubin = [1]*No_var # 决策变量上边界(0表示不包含该变量的上边界,1表示包含)
# 调用父类构造方法完成实例化
ea.Problem.init(self, name, M, maxormins, Dim, varTypes, lb, ub, lbin, ubin)
def evalVars(self, Vars): # 目标函数
f1 = model[0].predict_values(Vars)
f2 = model[1].predict_values(Vars)
f3 = model[2].predict_values(Vars)
ObjV = np.hstack([f1, f2, f3]) # 计算目标函数值矩阵
# ObjV = np.hstack([f1, f2]) # 计算目标函数值矩阵
# CV = -Vars ** 2 + 2.5 * Vars - 1.5 # 构建违反约束程度矩阵
return ObjV
以前的版本中Vars就是一个值,现在变成了种群对应的值,把我给搞懵了。跪求以前的版本号
from geatpy.
@xqb-python 按照demo来改成自己的代码看看。
from geatpy.
Related Issues (20)
- 进不去网站 HOT 4
- Geatpy Website has been moved to Github. HOT 4
- 有没有多目标,且又是混合染色体的案例 HOT 1
- 文档缺失 HOT 1
- 似乎无法基于先验解继续寻优 HOT 3
- 请问如何输出各个决策变量的值 并和两个函数值对应 HOT 1
- RuntimeError: error: ObjV is illegal.
- 停止条件设置 HOT 1
- 根据参考文献实现的线性变换与ea.scaling的计算结果不一样,请问具体ea.scaling的实现细节是什么样的呢,有文档吗 HOT 9
- 请问如何使用GPU模式运行优化呢 HOT 1
- 文档docs里面pdf缺失? HOT 1
- Please add new version with python3.11 on linux HOT 2
- 为什么最优解找出来了,但是图却画不出出来 HOT 1
- 离散变量怎么设置取值间隔,以提升取值的精度 HOT 2
- 单目标算法类中对于outFunc的类型检查错误还是没有更新? HOT 2
- NSGAII算法最终得出的pareto解集中存在部分解重复,而画出pareto前沿图一切正常,无重复 HOT 1
- 对geatpy项目的阶段性总结及建议
- 搞了两天了,安装不了 HOT 3
- tutorial细节问题
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.