数学建模习题5.4
摘要:import numpy as np from scipy.optimize import minimize def objective(x): return -np.sum(np.sqrt(x) * np.arange(1, 101)) def constraint1(x): return x[1
阅读全文
posted @
2024-10-14 23:33
VVV1
阅读(29)
推荐(0)
数学建模习题5.5
摘要:import numpy as np from scipy.optimize import minimize def objective(x): return 2x[0] + 3x[0]2 + 3*x[1] + x[1]2 + x[2] def constraint1(x): return 10 -
阅读全文
posted @
2024-10-14 23:35
VVV1
阅读(30)
推荐(0)
数学建模习题5.7
摘要:total_demand = sum(demands) dp = np.full((4, total_demand + 1), float('inf')) dp[0][0] = 0 prev_production = np.full((4, total_demand + 1), -1) for i
阅读全文
posted @
2024-10-14 23:37
VVV1
阅读(71)
推荐(0)