Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第三章第六章节3.6.1的目标函数是不是写错了 #12

Open
FarrFan opened this issue Jan 7, 2025 · 1 comment
Open

第三章第六章节3.6.1的目标函数是不是写错了 #12

FarrFan opened this issue Jan 7, 2025 · 1 comment

Comments

@FarrFan
Copy link

FarrFan commented Jan 7, 2025

原文中:

def func(x):
return 10.5+0.3x[0]+0.32x[1]+0.32x[2]+0.0007x[0]**2+0.0004x[1]**2+0.00045x[2]**2

用极小值目标函数取反因改为:
def func(x):
p1 = 3 + 0.004 * x[0] + 0.0025 * x[0] ** 2
p2 = 4 - 0.02 * x[1] + 0.0033 * x[1] ** 2
p3 = 6 + 0.0015 * x[2]
return -(p1 + p2 + p3)

@FarrFan
Copy link
Author

FarrFan commented Jan 7, 2025

3.6.2中选址问题,约束
'type':'eq','fun':lambda x: x[6]+x[12]-7 应该改为 'type':'eq','fun':lambda x: x[6]+x[12]-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant