質問編集履歴
1
コードを少し変更しました(途中で変数を使わず)が、エラーは同じです。
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,9 @@
|
|
6
6
|
|
7
7
|
がでてきます。
|
8
8
|
|
9
|
+
```python
|
9
10
|
|
11
|
+
コード
|
10
12
|
|
11
13
|
from pulp import *
|
12
14
|
|
@@ -18,13 +20,13 @@
|
|
18
20
|
|
19
21
|
UB = 30
|
20
22
|
|
21
|
-
a =
|
23
|
+
a = []
|
22
24
|
|
23
|
-
b =
|
25
|
+
b = []
|
24
26
|
|
25
|
-
c =
|
27
|
+
c = []
|
26
28
|
|
27
|
-
sum_radius =
|
29
|
+
sum_radius = []
|
28
30
|
|
29
31
|
|
30
32
|
|
@@ -56,19 +58,13 @@
|
|
56
58
|
|
57
59
|
for j in range(n):
|
58
60
|
|
59
|
-
|
61
|
+
m += {{(x[j] - x[i]) * (x[j] - x[i])} + {(y[j] - y[i]) * (y[j] - y[i])}} >= {(r[i] + r[j]) * (r[i] + r[j])}
|
60
62
|
|
61
|
-
|
63
|
+
if i < j:
|
62
64
|
|
63
|
-
|
65
|
+
m += u[i][j] + u[j][i] + v[i][j] + v[j][i] >= 1
|
64
66
|
|
65
|
-
sum_radius = (r[i] + r[j])
|
66
67
|
|
67
|
-
print(sum_radius)
|
68
|
-
|
69
|
-
m += c >= sum_radius
|
70
|
-
|
71
|
-
|
72
68
|
|
73
69
|
for i in range(n):
|
74
70
|
|
@@ -133,3 +129,5 @@
|
|
133
129
|
fig.savefig("test1.png")
|
134
130
|
|
135
131
|
plt.show()
|
132
|
+
|
133
|
+
```
|