Skip to content

Commit 41481e1

Browse files
committed
Fix wrong dvar shape in jagged array example
1 parent 09626d8 commit 41481e1

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

docs/en/tutorials/expressions.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,15 @@
466466
},
467467
{
468468
"cell_type": "code",
469-
"execution_count": 13,
469+
"execution_count": 14,
470470
"metadata": {},
471471
"outputs": [],
472472
"source": [
473473
"problem = jm.Problem('K-hot')\n",
474474
"problem += k_hot\n",
475475
"\n",
476476
"instance_data = {\n",
477-
" \"N\": 4,\n",
477+
" \"N\": 10,\n",
478478
" \"C\": [[1, 4, 5, 9],\n",
479479
" [2, 6],\n",
480480
" [3, 7, 8]],\n",

docs/ja/tutorials/expressions.ipynb

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
{
1515
"cell_type": "code",
16-
"execution_count": 1,
16+
"execution_count": 2,
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -45,7 +45,7 @@
4545
},
4646
{
4747
"cell_type": "code",
48-
"execution_count": 2,
48+
"execution_count": 3,
4949
"metadata": {},
5050
"outputs": [
5151
{
@@ -54,7 +54,7 @@
5454
"\"BinaryVar(name='x', shape=[]) + BinaryVar(name='y', shape=[])\""
5555
]
5656
},
57-
"execution_count": 2,
57+
"execution_count": 3,
5858
"metadata": {},
5959
"output_type": "execute_result"
6060
}
@@ -99,7 +99,7 @@
9999
},
100100
{
101101
"cell_type": "code",
102-
"execution_count": 5,
102+
"execution_count": 4,
103103
"metadata": {},
104104
"outputs": [
105105
{
@@ -108,7 +108,7 @@
108108
"\"BinaryVar(name='x', shape=[]) == BinaryVar(name='y', shape=[])\""
109109
]
110110
},
111-
"execution_count": 5,
111+
"execution_count": 4,
112112
"metadata": {},
113113
"output_type": "execute_result"
114114
}
@@ -121,7 +121,7 @@
121121
},
122122
{
123123
"cell_type": "code",
124-
"execution_count": 6,
124+
"execution_count": 5,
125125
"metadata": {},
126126
"outputs": [
127127
{
@@ -130,7 +130,7 @@
130130
"False"
131131
]
132132
},
133-
"execution_count": 6,
133+
"execution_count": 5,
134134
"metadata": {},
135135
"output_type": "execute_result"
136136
}
@@ -150,7 +150,7 @@
150150
},
151151
{
152152
"cell_type": "code",
153-
"execution_count": 7,
153+
"execution_count": 6,
154154
"metadata": {},
155155
"outputs": [
156156
{
@@ -162,7 +162,7 @@
162162
"BinaryVar(name='x', shape=[NumberLit(value=3), NumberLit(value=4)])[NumberLit(value=0), NumberLit(value=2)]"
163163
]
164164
},
165-
"execution_count": 7,
165+
"execution_count": 6,
166166
"metadata": {},
167167
"output_type": "execute_result"
168168
}
@@ -185,7 +185,7 @@
185185
},
186186
{
187187
"cell_type": "code",
188-
"execution_count": 8,
188+
"execution_count": 7,
189189
"metadata": {},
190190
"outputs": [
191191
{
@@ -197,7 +197,7 @@
197197
"BinaryVar(name='x', shape=[NumberLit(value=3), NumberLit(value=4)])[NumberLit(value=2) * Placeholder(name='n', ndim=0), NumberLit(value=3) * Placeholder(name='n', ndim=0)]"
198198
]
199199
},
200-
"execution_count": 8,
200+
"execution_count": 7,
201201
"metadata": {},
202202
"output_type": "execute_result"
203203
}
@@ -223,7 +223,7 @@
223223
},
224224
{
225225
"cell_type": "code",
226-
"execution_count": 9,
226+
"execution_count": 8,
227227
"metadata": {},
228228
"outputs": [
229229
{
@@ -235,7 +235,7 @@
235235
"sum(Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0))), BinaryVar(name='x', shape=[Placeholder(name='N', ndim=0)])[Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0)))])"
236236
]
237237
},
238-
"execution_count": 9,
238+
"execution_count": 8,
239239
"metadata": {},
240240
"output_type": "execute_result"
241241
}
@@ -288,7 +288,7 @@
288288
},
289289
{
290290
"cell_type": "code",
291-
"execution_count": 11,
291+
"execution_count": 9,
292292
"metadata": {},
293293
"outputs": [
294294
{
@@ -300,7 +300,7 @@
300300
"sum(Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0))), Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0))) * BinaryVar(name='x', shape=[Placeholder(name='N', ndim=0)])[Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0)))])"
301301
]
302302
},
303-
"execution_count": 11,
303+
"execution_count": 9,
304304
"metadata": {},
305305
"output_type": "execute_result"
306306
}
@@ -318,7 +318,7 @@
318318
},
319319
{
320320
"cell_type": "code",
321-
"execution_count": 12,
321+
"execution_count": 10,
322322
"metadata": {},
323323
"outputs": [
324324
{
@@ -330,7 +330,7 @@
330330
"sum(Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0))), BinaryVar(name='x', shape=[Placeholder(name='N', ndim=0)])[Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0)))]) * (- sum(Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0))), BinaryVar(name='x', shape=[Placeholder(name='N', ndim=0)])[Element(name='n', belong_to=(NumberLit(value=0), Placeholder(name='N', ndim=0)))]) + NumberLit(value=1))"
331331
]
332332
},
333-
"execution_count": 12,
333+
"execution_count": 10,
334334
"metadata": {},
335335
"output_type": "execute_result"
336336
}
@@ -367,7 +367,7 @@
367367
},
368368
{
369369
"cell_type": "code",
370-
"execution_count": 13,
370+
"execution_count": 15,
371371
"metadata": {},
372372
"outputs": [],
373373
"source": [
@@ -393,7 +393,7 @@
393393
},
394394
{
395395
"cell_type": "code",
396-
"execution_count": 14,
396+
"execution_count": 16,
397397
"metadata": {},
398398
"outputs": [],
399399
"source": [
@@ -432,7 +432,7 @@
432432
},
433433
{
434434
"cell_type": "code",
435-
"execution_count": 15,
435+
"execution_count": 17,
436436
"metadata": {},
437437
"outputs": [],
438438
"source": [
@@ -466,15 +466,15 @@
466466
},
467467
{
468468
"cell_type": "code",
469-
"execution_count": null,
469+
"execution_count": 20,
470470
"metadata": {},
471471
"outputs": [],
472472
"source": [
473473
"problem = jm.Problem('K-hot')\n",
474474
"problem += k_hot\n",
475475
"\n",
476476
"instance_data = {\n",
477-
" \"N\": 4,\n",
477+
" \"N\": 10,\n",
478478
" \"C\": [[1, 4, 5, 9],\n",
479479
" [2, 6],\n",
480480
" [3, 7, 8]],\n",

0 commit comments

Comments
 (0)