上一页 1 ··· 6 7 8 9 10
摘要: 习题4.4代码 import cvxpy as cp import numpy as np import pandas as pd import sympy as sp sp.init_printing(use_unicode=True) import matplotlib.pyplot as pl 阅读全文
posted @ 2024-10-22 12:59 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 习题4.3代码 import cvxpy as cp import numpy as np import matplotlib.pyplot as plt plt.rcParams['font.sans-serif']=['Times New Roman + SimSun + WFM Sans SC 阅读全文
posted @ 2024-10-22 12:57 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 习题5.7代码 import cvxpy import cvxpy as cp import numpy as np import pandas as pd from scipy.optimize import minimize import sympy as sp sp.init_printing 阅读全文
posted @ 2024-10-22 12:41 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 例题6.11代码 import cvxpy as cp import networkx as nx import numpy as np Adjt = [(1,2,18),(1,5,15),(2,3,20),(2,4,60),(2,5,12), (3,4,30),(3,5,18),(4,6,10), 阅读全文
posted @ 2024-10-22 12:34 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 例题6.10代码 import networkx as nx import numpy as np Adjt = [(1,2,20), (1,5,15), (2,3,20), (2,4,60), (2,5,25), (3,4,30), (3,5,18), (5,6,15)] G = nx.Graph 阅读全文
posted @ 2024-10-22 12:32 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 习题6.1代码 import numpy as np import pandas as pd import cvxpy as cp import networkx as nx import matplotlib.pyplot as plt plt.rcParams['font.sans-serif' 阅读全文
posted @ 2024-10-22 12:29 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 习题6.4代码 \import numpy as np import pandas as pd import cvxpy as cp import networkx as nx import matplotlib.pyplot as plt plt.rcParams['font.sans-serif 阅读全文
posted @ 2024-10-22 12:28 等我刷把宗师 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 习题6.3代码 import numpy as np import pandas as pd import cvxpy as cp import networkx as nx import matplotlib.pyplot as plt plt.rcParams['font.sans-serif' 阅读全文
posted @ 2024-10-22 12:26 等我刷把宗师 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 习题6.7代码 import numpy as np import pandas as pd import cvxpy as cp import networkx as nx import matplotlib.pyplot as plt df = pd.read_excel('F:\python数 阅读全文
posted @ 2024-10-21 23:38 等我刷把宗师 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 习题6.5代码 import numpy as np import cvxpy as cp import networkx as nx n = 6 A=np.zeros((n,n)) A[0,[1,2]]=[2,7] A[1,2:5]=[4,6,8] A[2,[3,4]]=[1,3] A[3,[4, 阅读全文
posted @ 2024-10-21 23:29 等我刷把宗师 阅读(5) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10