{"id":1047424,"date":"2024-12-31T13:42:30","date_gmt":"2024-12-31T05:42:30","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1047424.html"},"modified":"2024-12-31T13:42:33","modified_gmt":"2024-12-31T05:42:33","slug":"python%e7%ba%bf%e6%80%a7%e8%a7%84%e5%88%92%e4%b8%ad%e5%a6%82%e4%bd%95%e5%8f%96%e6%95%b4","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1047424.html","title":{"rendered":"python\u7ebf\u6027\u89c4\u5212\u4e2d\u5982\u4f55\u53d6\u6574"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/2108d770-3da8-4010-8b6c-452a55204a2b.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u7ebf\u6027\u89c4\u5212\u4e2d\u5982\u4f55\u53d6\u6574\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u7ebf\u6027\u89c4\u5212\uff08Linear Programming, LP\uff09\u548c\u6574\u6570\u7ebf\u6027\u89c4\u5212\uff08Integer Linear Programming, ILP\uff09\u662f\u4f18\u5316\u95ee\u9898\u4e2d\u5e38\u7528\u7684\u6280\u672f\u3002<strong>\u4f7f\u7528\u6574\u6570\u7ebf\u6027\u89c4\u5212\uff08ILP\uff09\u6765\u786e\u4fdd\u89e3\u7684\u53d8\u91cf\u662f\u6574\u6570\u3001\u4f7f\u7528\u5e93\u5982PuLP\u3001SciPy\u3001Gurobi\u7b49\u53ef\u4ee5\u5b9e\u73b0\u6574\u6570\u7ebf\u6027\u89c4\u5212<\/strong>\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u6574\u6570\u7ebf\u6027\u89c4\u5212\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528PuLP\u5e93<\/h3>\n<\/p>\n<p><p>PuLP\u662f\u4e00\u4e2a\u7528\u4e8e\u7ebf\u6027\u89c4\u5212\u7684Python\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u7b80\u5355\u6613\u7528\u7684\u63a5\u53e3\u6765\u5b9a\u4e49\u548c\u6c42\u89e3\u7ebf\u6027\u89c4\u5212\u95ee\u9898\uff0c\u5305\u62ec\u6574\u6570\u7ebf\u6027\u89c4\u5212\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5PuLP<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5PuLP\u5e93\u3002\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pulp<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5b9a\u4e49\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u901a\u8fc7PuLP\u5b9a\u4e49\u4e00\u4e2a\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898\u3002\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u7b80\u5355\u7684\u4f18\u5316\u95ee\u9898\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pulp import LpMaximize, LpProblem, LpVariable, lpSum<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u6700\u5927\u5316\u95ee\u9898<\/strong><\/h2>\n<p>problem = LpProblem(&quot;Maximize Example&quot;, LpMaximize)<\/p>\n<h2><strong>\u5b9a\u4e49\u53d8\u91cf\uff0c\u5e76\u6307\u5b9a\u5b83\u4eec\u4e3a\u6574\u6570<\/strong><\/h2>\n<p>x = LpVariable(&#39;x&#39;, lowBound=0, cat=&#39;Integer&#39;)<\/p>\n<p>y = LpVariable(&#39;y&#39;, lowBound=0, cat=&#39;Integer&#39;)<\/p>\n<h2><strong>\u76ee\u6807\u51fd\u6570<\/strong><\/h2>\n<p>problem += 3*x + 2*y<\/p>\n<h2><strong>\u7ea6\u675f\u6761\u4ef6<\/strong><\/h2>\n<p>problem += 2*x + y &lt;= 20<\/p>\n<p>problem += 4*x - 5*y &gt;= -10<\/p>\n<p>problem += x + 2*y == 15<\/p>\n<h2><strong>\u6c42\u89e3\u95ee\u9898<\/strong><\/h2>\n<p>problem.solve()<\/p>\n<h2><strong>\u8f93\u51fa\u7ed3\u679c<\/strong><\/h2>\n<p>print(f&quot;x = {x.varValue}&quot;)<\/p>\n<p>print(f&quot;y = {y.varValue}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u4f7f\u7528PuLP\u521b\u5efa\u4e86\u4e00\u4e2a\u6700\u5927\u5316\u95ee\u9898\uff0c\u5e76\u5b9a\u4e49\u4e86\u4e24\u4e2a\u6574\u6570\u53d8\u91cf<code>x<\/code>\u548c<code>y<\/code>\u3002\u7136\u540e\uff0c\u5b9a\u4e49\u4e86\u76ee\u6807\u51fd\u6570\u548c\u7ea6\u675f\u6761\u4ef6\uff0c\u5e76\u8c03\u7528<code>solve()<\/code>\u65b9\u6cd5\u6765\u6c42\u89e3\u95ee\u9898\u3002\u6700\u540e\uff0c\u8f93\u51fa\u53d8\u91cf\u7684\u6700\u4f18\u89e3\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528SciPy\u5e93<\/h3>\n<\/p>\n<p><p>SciPy\u5e93\u4e5f\u53ef\u4ee5\u7528\u4e8e\u89e3\u51b3\u7ebf\u6027\u89c4\u5212\u95ee\u9898\uff0c\u4f46\u5728SciPy\u4e2d\uff0c\u6574\u6570\u7ebf\u6027\u89c4\u5212\u9700\u8981\u4f7f\u7528\u6df7\u5408\u6574\u6570\u7ebf\u6027\u89c4\u5212\uff08Mixed-Integer Linear Programming, MILP\uff09\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5SciPy<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5SciPy\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install scipy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5b9a\u4e49\u6df7\u5408\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u901a\u8fc7SciPy\u5b9a\u4e49\u4e00\u4e2a\u6df7\u5408\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from scipy.optimize import linprog<\/p>\n<p>import numpy as np<\/p>\n<h2><strong>\u76ee\u6807\u51fd\u6570\u7cfb\u6570<\/strong><\/h2>\n<p>c = [-3, -2]<\/p>\n<h2><strong>\u4e0d\u7b49\u5f0f\u7ea6\u675f\u7684\u5de6\u4fa7\u7cfb\u6570\u77e9\u9635<\/strong><\/h2>\n<p>A = [[2, 1], [4, -5]]<\/p>\n<h2><strong>\u4e0d\u7b49\u5f0f\u7ea6\u675f\u7684\u53f3\u4fa7\u7cfb\u6570\u77e9\u9635<\/strong><\/h2>\n<p>b = [20, -10]<\/p>\n<h2><strong>\u7b49\u5f0f\u7ea6\u675f\u7684\u5de6\u4fa7\u7cfb\u6570\u77e9\u9635<\/strong><\/h2>\n<p>A_eq = [[1, 2]]<\/p>\n<h2><strong>\u7b49\u5f0f\u7ea6\u675f\u7684\u53f3\u4fa7\u7cfb\u6570\u77e9\u9635<\/strong><\/h2>\n<p>b_eq = [15]<\/p>\n<h2><strong>\u53d8\u91cf\u7684\u754c\u9650<\/strong><\/h2>\n<p>x_bounds = (0, None)<\/p>\n<p>y_bounds = (0, None)<\/p>\n<h2><strong>\u4f7f\u7528branch and bound\u65b9\u6cd5\u6c42\u89e3\u6574\u6570\u95ee\u9898<\/strong><\/h2>\n<p>result = linprog(c, A_ub=A, b_ub=b, A_eq=A_eq, b_eq=b_eq, bounds=[x_bounds, y_bounds], method=&#39;highs&#39;)<\/p>\n<h2><strong>\u8f93\u51fa\u7ed3\u679c<\/strong><\/h2>\n<p>print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528SciPy\u7684<code>linprog<\/code>\u51fd\u6570\u6765\u5b9a\u4e49\u548c\u6c42\u89e3\u7ebf\u6027\u89c4\u5212\u95ee\u9898\u3002\u7531\u4e8e<code>linprog<\/code>\u9ed8\u8ba4\u4e0d\u652f\u6301\u6574\u6570\u53d8\u91cf\uff0c\u56e0\u6b64\u9700\u8981\u4f7f\u7528\u5176\u4ed6\u65b9\u6cd5\uff08\u5982Branch and Bound\uff09\u6765\u786e\u4fdd\u89e3\u662f\u6574\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528Gurobi\u5e93<\/h3>\n<\/p>\n<p><p>Gurobi\u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684\u5546\u7528\u4f18\u5316\u6c42\u89e3\u5668\uff0c\u652f\u6301\u591a\u79cd\u4f18\u5316\u95ee\u9898\uff0c\u5305\u62ec\u7ebf\u6027\u89c4\u5212\u548c\u6574\u6570\u7ebf\u6027\u89c4\u5212\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5Gurobi<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Gurobi\u5e93\u3002\u53ef\u4ee5\u4eceGurobi\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u6309\u7167\u5b89\u88c5\u6307\u5357\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><h4>2. \u5b9a\u4e49\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u901a\u8fc7Gurobi\u5b9a\u4e49\u4e00\u4e2a\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from gurobipy import Model, GRB<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u6a21\u578b<\/strong><\/h2>\n<p>model = Model(&quot;Maximize Example&quot;)<\/p>\n<h2><strong>\u5b9a\u4e49\u53d8\u91cf\uff0c\u5e76\u6307\u5b9a\u5b83\u4eec\u4e3a\u6574\u6570<\/strong><\/h2>\n<p>x = model.addVar(vtype=GRB.INTEGER, name=&quot;x&quot;)<\/p>\n<p>y = model.addVar(vtype=GRB.INTEGER, name=&quot;y&quot;)<\/p>\n<h2><strong>\u8bbe\u7f6e\u76ee\u6807\u51fd\u6570<\/strong><\/h2>\n<p>model.setObjective(3*x + 2*y, GRB.MAXIMIZE)<\/p>\n<h2><strong>\u6dfb\u52a0\u7ea6\u675f\u6761\u4ef6<\/strong><\/h2>\n<p>model.addConstr(2*x + y &lt;= 20)<\/p>\n<p>model.addConstr(4*x - 5*y &gt;= -10)<\/p>\n<p>model.addConstr(x + 2*y == 15)<\/p>\n<h2><strong>\u6c42\u89e3\u95ee\u9898<\/strong><\/h2>\n<p>model.optimize()<\/p>\n<h2><strong>\u8f93\u51fa\u7ed3\u679c<\/strong><\/h2>\n<p>for v in model.getVars():<\/p>\n<p>    print(f&quot;{v.varName} = {v.x}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u4f7f\u7528Gurobi\u521b\u5efa\u4e86\u4e00\u4e2a\u6574\u6570\u7ebf\u6027\u89c4\u5212\u6a21\u578b\uff0c\u5e76\u5b9a\u4e49\u4e86\u4e24\u4e2a\u6574\u6570\u53d8\u91cf<code>x<\/code>\u548c<code>y<\/code>\u3002\u7136\u540e\uff0c\u5b9a\u4e49\u4e86\u76ee\u6807\u51fd\u6570\u548c\u7ea6\u675f\u6761\u4ef6\uff0c\u5e76\u8c03\u7528<code>optimize()<\/code>\u65b9\u6cd5\u6765\u6c42\u89e3\u95ee\u9898\u3002\u6700\u540e\uff0c\u8f93\u51fa\u53d8\u91cf\u7684\u6700\u4f18\u89e3\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528\u5176\u4ed6\u5e93\u6216\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4e0a\u8ff0\u5e93\u548c\u65b9\u6cd5\u4e4b\u5916\uff0c\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u5e93\u4e5f\u53ef\u4ee5\u7528\u4e8e\u89e3\u51b3\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898\uff0c\u6bd4\u5982OR-Tools\u548cPyomo\u3002\u4e0d\u540c\u7684\u5e93\u6709\u4e0d\u540c\u7684\u529f\u80fd\u548c\u7279\u70b9\uff0c\u9009\u62e9\u9002\u5408\u4f60\u7684\u5e93\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u95ee\u9898\u548c\u9700\u6c42\u6765\u51b3\u5b9a\u3002<\/p>\n<\/p>\n<p><p>\u603b\u4e4b\uff0c<strong>\u5728Python\u4e2d\u89e3\u51b3\u6574\u6570\u7ebf\u6027\u89c4\u5212\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528PuLP\u3001SciPy\u3001Gurobi\u7b49\u5e93\uff0c\u901a\u8fc7\u5b9a\u4e49\u6574\u6570\u53d8\u91cf\u5e76\u8bbe\u7f6e\u76ee\u6807\u51fd\u6570\u548c\u7ea6\u675f\u6761\u4ef6\u6765\u6c42\u89e3<\/strong>\u3002\u6bcf\u4e2a\u5e93\u90fd\u6709\u5176\u72ec\u7279\u7684\u63a5\u53e3\u548c\u529f\u80fd\uff0c\u9009\u62e9\u9002\u5408\u4f60\u7684\u5e93\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u9ad8\u6548\u5730\u89e3\u51b3\u4f18\u5316\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\u8fdb\u884c\u7ebf\u6027\u89c4\u5212\u65f6\uff0c\u5982\u4f55\u786e\u4fdd\u53d8\u91cf\u53d6\u6574\uff1f<\/strong><br \/>\u5728Python\u4e2d\u8fdb\u884c\u7ebf\u6027\u89c4\u5212\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u6574\u6570\u89c4\u5212\u6a21\u578b\u6765\u786e\u4fdd\u53d8\u91cf\u53d6\u6574\u3002\u5e38\u7528\u7684\u5e93\u5982PuLP\u548cSciPy\u90fd\u63d0\u4f9b\u4e86\u6574\u6570\u7ea6\u675f\u7684\u529f\u80fd\u3002\u5728PuLP\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u53d8\u91cf\u7684<code>cat<\/code>\u53c2\u6570\u4e3a<code>LpInteger<\/code>\uff0c\u4ee5\u786e\u4fdd\u8be5\u53d8\u91cf\u4e3a\u6574\u6570\u3002\u4f7f\u7528SciPy\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ea6\u675f\u6761\u4ef6\u6765\u9650\u5236\u53d8\u91cf\u4e3a\u6574\u6570\uff0c\u901a\u5e38\u7ed3\u5408\u4f7f\u7528<code>linprog<\/code>\u51fd\u6570\u548c\u81ea\u5b9a\u4e49\u7684\u6574\u6570\u7ea6\u675f\u6761\u4ef6\u3002<\/p>\n<p><strong>Python\u7ebf\u6027\u89c4\u5212\u4e2d\uff0c\u5982\u4f55\u5904\u7406\u975e\u6574\u6570\u89e3\u7684\u60c5\u51b5\uff1f<\/strong><br \/>\u82e5\u5728\u6c42\u89e3\u7ebf\u6027\u89c4\u5212\u65f6\u5f97\u5230\u975e\u6574\u6570\u89e3\uff0c\u53ef\u4ee5\u8003\u8651\u91c7\u7528\u6df7\u5408\u6574\u6570\u7ebf\u6027\u89c4\u5212\uff08MILP\uff09\u65b9\u6cd5\u3002\u901a\u8fc7\u8bbe\u7f6e\u67d0\u4e9b\u53d8\u91cf\u4e3a\u6574\u6570\uff0c\u800c\u5176\u4ed6\u53d8\u91cf\u53ef\u4ee5\u662f\u8fde\u7eed\u503c\uff0c\u80fd\u591f\u6709\u6548\u5730\u5904\u7406\u5b9e\u9645\u5e94\u7528\u4e2d\u9700\u8981\u53d6\u6574\u7684\u60c5\u51b5\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u4f7f\u7528\u6c42\u89e3\u5668\u7684\u7279\u5b9a\u9009\u9879\u6765\u5bfb\u627e\u6700\u63a5\u8fd1\u7684\u6574\u6570\u89e3\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528Python\u8fdb\u884c\u7ebf\u6027\u89c4\u5212\u65f6\uff0c\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u6c42\u89e3\u5668\uff1f<\/strong><br \/>\u9009\u62e9\u5408\u9002\u7684\u6c42\u89e3\u5668\u53d6\u51b3\u4e8e\u95ee\u9898\u7684\u590d\u6742\u6027\u548c\u5177\u4f53\u9700\u6c42\u3002\u5bf9\u4e8e\u7b80\u5355\u7684\u7ebf\u6027\u89c4\u5212\u95ee\u9898\uff0c\u53ef\u4ee5\u9009\u62e9SciPy\u7684<code>linprog<\/code>\uff0c\u800c\u5bf9\u4e8e\u9700\u8981\u6574\u6570\u7ea6\u675f\u7684\u60c5\u51b5\uff0cPuLP\u4e0eCBC\u6c42\u89e3\u5668\u6216Gurobi\u7b49\u66f4\u4e3a\u590d\u6742\u7684\u6c42\u89e3\u5668\u4f1a\u66f4\u4e3a\u9ad8\u6548\u3002\u5728\u9009\u62e9\u6c42\u89e3\u5668\u65f6\uff0c\u9700\u8003\u8651\u95ee\u9898\u89c4\u6a21\u3001\u6c42\u89e3\u901f\u5ea6\u548c\u51c6\u786e\u6027\u7b49\u56e0\u7d20\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u7ebf\u6027\u89c4\u5212\uff08Linear Programming, LP\uff09\u548c\u6574\u6570\u7ebf\u6027\u89c4\u5212\uff08Integer Li [&hellip;]","protected":false},"author":3,"featured_media":1047435,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1047424"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1047424"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1047424\/revisions"}],"predecessor-version":[{"id":1047439,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1047424\/revisions\/1047439"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1047435"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1047424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1047424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1047424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}