跳转到内容

AI 首答试用:原始答案

研究总览 · 2026-09-20

附录 G.7–G.10:四种候选的原始 JSON 产物,保留原文。

同组材料:任务与协议 · 原始答案 · 验收重放

{
"T1": {
"variants": [
{
"when": "p.height >= p.d + 2*p.edge && p.width >= 2*p.edge + p.d + (p.n-1)*(p.d+p.web)",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"p.edge+p.d/2","y":"p.height/2","dx":"(p.width-2*p.edge-p.d)/(p.n-1)","dy":0,"r":"p.d/2"}
],
"checks": []
}
]
},
"T2": {
"variants": [
{
"when": "p.height >= p.d + 2*p.edge && p.pitch >= p.d+p.web && p.width >= (p.n-1)*p.pitch + p.d + 2*p.edge",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"(p.width-(p.n-1)*p.pitch)/2","y":"p.height/2","dx":"p.pitch","dy":0,"r":"p.d/2"}
],
"checks": []
}
]
},
"T3": {
"variants": [
{
"when": "p.allowed.includes('row') && p.height >= p.d+2*p.edge && p.width >= 2*p.edge+p.d+3*(p.d+p.web)",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"(p.width-3*(p.d+p.web))/2","y":"p.height/2","dx":"p.d+p.web","dy":0,"r":"p.d/2"}
],
"checks": []
},
{
"when": "p.allowed.includes('grid') && p.width >= 2*p.edge+2*p.d+p.web && p.height >= 2*p.edge+2*p.d+p.web",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"grid","nx":2,"ny":2,"x":"(p.width-p.d-p.web)/2","y":"(p.height-p.d-p.web)/2","dx":"p.d+p.web","dy":"p.d+p.web","r":"p.d/2"}
],
"checks": []
}
]
},
"T4": {
"variants": [
{
"when": "p.width >= p.d+2*p.edge && p.height >= p.d+2*p.edge && 2*p.rho*Math.sin(Math.PI/p.n) >= p.d+p.web",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"circular","n":"p.n","cx":"p.width/2","cy":"p.height/2","rho":"p.rho","phase":"p.phase","r":"p.d/2"}
],
"checks": [
"g.holes.every((h,i) => Math.abs(p.rho*Math.cos(p.phase+2*Math.PI*i/p.n))+p.d/2+p.edge <= p.width/2 && Math.abs(p.rho*Math.sin(p.phase+2*Math.PI*i/p.n))+p.d/2+p.edge <= p.height/2)"
]
}
]
},
"T5": {
"variants": [
{
"when": "p.height >= p.d+2*p.edge && p.pitch >= p.d+p.web && p.minWidth <= p.maxWidth && Math.max(p.minWidth,(p.n-1)*p.pitch+p.d+2*p.edge) <= p.maxWidth",
"features": [
{"kind":"plate","width":"Math.max(p.minWidth,(p.n-1)*p.pitch+p.d+2*p.edge)","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"(Math.max(p.minWidth,(p.n-1)*p.pitch+p.d+2*p.edge)-(p.n-1)*p.pitch)/2","y":"p.height/2","dx":"p.pitch","dy":0,"r":"p.d/2"}
],
"checks": []
}
]
}
}

{
"T1": {
"source": "function(p) {\n const requiredWidth = 2*p.edge + p.d + (p.n-1)*(p.d+p.web);\n if (p.height < 2*p.edge+p.d || p.width < requiredWidth) {\n return {status:'infeasible',reason:'The exact-end-margin row cannot satisfy the edge and adjacent-hole clearances.'};\n }\n const pitch = (p.width-2*p.edge-p.d)/(p.n-1);\n const holes = [];\n for (let i=0;i<p.n;i++) holes.push({x:p.edge+p.d/2+i*pitch,y:p.height/2,r:p.d/2});\n return {width:p.width,height:p.height,thickness:p.thickness,holes:holes};\n}"
},
"T2": {
"source": "function(p) {\n const span = (p.n-1)*p.pitch;\n if (p.pitch < p.d+p.web || p.height < 2*p.edge+p.d || p.width < span+p.d+2*p.edge) {\n return {status:'infeasible',reason:'The fixed-pitch centred row cannot satisfy its edge or adjacent-hole clearance.'};\n }\n const first = (p.width-span)/2;\n const holes = [];\n for (let i=0;i<p.n;i++) holes.push({x:first+i*p.pitch,y:p.height/2,r:p.d/2});\n return {width:p.width,height:p.height,thickness:p.thickness,holes:holes};\n}"
},
"T3": {
"source": "function(p) {\n const pitch = p.d+p.web;\n const edgeSpan = p.d+2*p.edge;\n const holes = [];\n if (p.allowed.includes('row') && p.width >= edgeSpan+3*pitch && p.height >= edgeSpan) {\n const first = (p.width-3*pitch)/2;\n for (let i=0;i<4;i++) holes.push({x:first+i*pitch,y:p.height/2,r:p.d/2});\n } else if (p.allowed.includes('grid') && p.width >= edgeSpan+pitch && p.height >= edgeSpan+pitch) {\n for (let j=0;j<2;j++) {\n for (let i=0;i<2;i++) holes.push({x:p.width/2+(i-0.5)*pitch,y:p.height/2+(j-0.5)*pitch,r:p.d/2});\n }\n } else {\n return {status:'infeasible',reason:'No authorized structure can meet all edge and hole clearances; a row is preferred whenever feasible and authorized.'};\n }\n return {width:p.width,height:p.height,thickness:p.thickness,holes:holes};\n}"
},
"T4": {
"source": "function(p) {\n const radius = p.d/2;\n const requiredCentreGap = p.d+p.web;\n const neighbourGap = 2*p.rho*Math.sin(Math.PI/p.n);\n function less(a,b) {\n return a < b && b-a > 1.4210854715202004e-14*Math.max(1,Math.abs(a),Math.abs(b));\n }\n if (less(neighbourGap,requiredCentreGap)) {\n return {status:'infeasible',reason:'Adjacent bolt-circle holes have insufficient boundary clearance.'};\n }\n const holes = [];\n for (let i=0;i<p.n;i++) {\n const angle = p.phase+2*Math.PI*i/p.n;\n const x = p.width/2+p.rho*Math.cos(angle);\n const y = p.height/2+p.rho*Math.sin(angle);\n if (less(x-radius,p.edge) || less(p.width-x-radius,p.edge) || less(y-radius,p.edge) || less(p.height-y-radius,p.edge)) {\n return {status:'infeasible',reason:'The specified orientation and bolt-circle radius violate a plate-edge clearance.'};\n }\n holes.push({x:x,y:y,r:radius});\n }\n return {width:p.width,height:p.height,thickness:p.thickness,holes:holes};\n}"
},
"T5": {
"source": "function(p) {\n if (p.pitch < p.d+p.web || p.height < 2*p.edge+p.d || p.minWidth > p.maxWidth) {\n return {status:'infeasible',reason:'The fixed pitch, height, or width interval precludes a feasible centred row.'};\n }\n const span = (p.n-1)*p.pitch;\n const width = Math.max(p.minWidth,span+p.d+2*p.edge);\n if (width > p.maxWidth) {\n return {status:'infeasible',reason:'The minimum width required for both end clearances exceeds the upper bound.'};\n }\n const first = (width-span)/2;\n const holes = [];\n for (let i=0;i<p.n;i++) holes.push({x:first+i*p.pitch,y:p.height/2,r:p.d/2});\n return {width:width,height:p.height,thickness:p.thickness,holes:holes};\n}"
}
}

{
"T1": {
"branches": [
{
"when": "p.height >= 2*p.edge+p.d && p.width >= 2*p.edge+p.d+(p.n-1)*(p.d+p.web)",
"vars": {},
"constraints": [],
"geometry": {
"width": "p.width",
"height": "p.height",
"thickness": "p.thickness",
"holes": [
{
"count": "p.n",
"x": "p.edge+p.d/2+i*(p.width-2*p.edge-p.d)/(p.n-1)",
"y": "p.height/2",
"r": "p.d/2"
}
]
},
"checks": []
}
]
},
"T2": {
"branches": [
{
"when": "p.height >= 2*p.edge+p.d && p.pitch >= p.d+p.web && p.width >= 2*p.edge+p.d+(p.n-1)*p.pitch",
"vars": {},
"constraints": [],
"geometry": {
"width": "p.width",
"height": "p.height",
"thickness": "p.thickness",
"holes": [
{
"count": "p.n",
"x": "(p.width-(p.n-1)*p.pitch)/2+i*p.pitch",
"y": "p.height/2",
"r": "p.d/2"
}
]
},
"checks": []
}
]
},
"T3": {
"branches": [
{
"when": "p.allowed.includes('row') && p.height >= 2*p.edge+p.d && p.width >= 2*p.edge+p.d+3*(p.d+p.web)",
"vars": {},
"constraints": [],
"geometry": {
"width": "p.width",
"height": "p.height",
"thickness": "p.thickness",
"holes": [
{
"count": "p.n",
"x": "(p.width-3*(p.d+p.web))/2+i*(p.d+p.web)",
"y": "p.height/2",
"r": "p.d/2"
}
]
},
"checks": []
},
{
"when": "p.allowed.includes('grid') && p.width >= 2*p.edge+2*p.d+p.web && p.height >= 2*p.edge+2*p.d+p.web",
"vars": {},
"constraints": [],
"geometry": {
"width": "p.width",
"height": "p.height",
"thickness": "p.thickness",
"holes": [
{
"count": "p.n",
"x": "(p.width-(p.d+p.web))/2+(i%2)*(p.d+p.web)",
"y": "(p.height-(p.d+p.web))/2+Math.floor(i/2)*(p.d+p.web)",
"r": "p.d/2"
}
]
},
"checks": []
}
]
},
"T4": {
"branches": [
{
"when": "2*p.rho*Math.sin(Math.PI/p.n) >= p.d+p.web",
"vars": {},
"constraints": [],
"geometry": {
"width": "p.width",
"height": "p.height",
"thickness": "p.thickness",
"holes": [
{
"count": "p.n",
"x": "p.width/2+p.rho*Math.cos(p.phase+2*Math.PI*i/p.n)",
"y": "p.height/2+p.rho*Math.sin(p.phase+2*Math.PI*i/p.n)",
"r": "p.d/2"
}
]
},
"checks": [
"g.holes.every((h,k) => Math.abs(p.rho*Math.cos(p.phase+2*Math.PI*k/p.n)) <= (p.width-p.d)/2-p.edge && Math.abs(p.rho*Math.sin(p.phase+2*Math.PI*k/p.n)) <= (p.height-p.d)/2-p.edge)"
]
}
]
},
"T5": {
"branches": [
{
"when": "p.minWidth <= p.maxWidth && p.height >= 2*p.edge+p.d && p.pitch >= p.d+p.web",
"vars": {
"width": {
"lower": "p.minWidth",
"upper": "p.maxWidth",
"cost": 1
}
},
"constraints": [
{
"terms": {
"width": 1
},
"op": "ge",
"rhs": "2*p.edge+p.d+(p.n-1)*p.pitch"
}
],
"geometry": {
"width": "v.width",
"height": "p.height",
"thickness": "p.thickness",
"holes": [
{
"count": "p.n",
"x": "(v.width-(p.n-1)*p.pitch)/2+i*p.pitch",
"y": "p.height/2",
"r": "p.d/2"
}
]
},
"checks": [
"g.width >= p.minWidth && g.width <= p.maxWidth && g.width >= 2*p.edge+p.d+(p.n-1)*p.pitch"
]
}
]
}
}

{
"T1": {
"branches": [
{
"when": "p.height >= p.d + 2*p.edge && p.width >= 2*p.edge + p.d + (p.n-1)*(p.d+p.web)",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"p.edge+p.d/2","y":"p.height/2","dx":"(p.width-2*p.edge-p.d)/(p.n-1)","dy":0,"r":"p.d/2"}
]
}
]
},
"T2": {
"branches": [
{
"when": "p.pitch >= p.d+p.web && p.height >= p.d+2*p.edge && p.width >= 2*p.edge+p.d+(p.n-1)*p.pitch",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"(p.width-(p.n-1)*p.pitch)/2","y":"p.height/2","dx":"p.pitch","dy":0,"r":"p.d/2"}
]
}
]
},
"T3": {
"branches": [
{
"when": "p.allowed.includes('row') && p.height >= p.d+2*p.edge && p.width >= 2*p.edge+p.d+3*(p.d+p.web)",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"(p.width-3*(p.d+p.web))/2","y":"p.height/2","dx":"p.d+p.web","dy":0,"r":"p.d/2"}
]
},
{
"when": "p.allowed.includes('grid') && p.width >= 2*p.edge+2*p.d+p.web && p.height >= 2*p.edge+2*p.d+p.web",
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"grid","nx":2,"ny":2,"x":"(p.width-p.d-p.web)/2","y":"(p.height-p.d-p.web)/2","dx":"p.d+p.web","dy":"p.d+p.web","r":"p.d/2"}
]
}
]
},
"T4": {
"branches": [
{
"features": [
{"kind":"plate","width":"p.width","height":"p.height","thickness":"p.thickness"},
{"kind":"circular","n":"p.n","cx":"p.width/2","cy":"p.height/2","rho":"p.rho","phase":"p.phase","r":"p.d/2"}
],
"checks": [
"g.holes.every(h => h.x-h.r >= p.edge-64*2.220446049250313e-16*Math.max(1,p.width,p.height,p.rho,p.d,p.edge) && g.width-h.x-h.r >= p.edge-64*2.220446049250313e-16*Math.max(1,p.width,p.height,p.rho,p.d,p.edge) && h.y-h.r >= p.edge-64*2.220446049250313e-16*Math.max(1,p.width,p.height,p.rho,p.d,p.edge) && g.height-h.y-h.r >= p.edge-64*2.220446049250313e-16*Math.max(1,p.width,p.height,p.rho,p.d,p.edge))",
"g.holes.every((a,j) => g.holes.every((b,k) => k <= j || Math.hypot(a.x-b.x,a.y-b.y) >= a.r+b.r+p.web-64*2.220446049250313e-16*Math.max(1,p.width,p.height,p.rho,p.d,p.web)))"
]
}
]
},
"T5": {
"branches": [
{
"when": "p.pitch >= p.d+p.web && p.height >= p.d+2*p.edge && p.minWidth <= p.maxWidth",
"vars": {
"width": {"lower":"p.minWidth","upper":"p.maxWidth","cost":1}
},
"constraints": [
{"terms":{"width":1},"op":"ge","rhs":"2*p.edge+p.d+(p.n-1)*p.pitch"}
],
"features": [
{"kind":"plate","width":"v.width","height":"p.height","thickness":"p.thickness"},
{"kind":"linear","n":"p.n","x":"(v.width-(p.n-1)*p.pitch)/2","y":"p.height/2","dx":"p.pitch","dy":0,"r":"p.d/2"}
]
}
]
}
}