Skip to content

Commit 13f8dd3

Browse files
committed
updates constraint tutorial
1 parent 2fbec4c commit 13f8dd3

File tree

1 file changed

+18
-30
lines changed

1 file changed

+18
-30
lines changed

docs/source/examples/constraint_tutorial.ipynb

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
},
212212
{
213213
"cell_type": "code",
214-
"execution_count": 7,
214+
"execution_count": 5,
215215
"metadata": {},
216216
"outputs": [
217217
{
@@ -222,7 +222,7 @@
222222
" Battery: 815.3412599999999 MW]"
223223
]
224224
},
225-
"execution_count": 7,
225+
"execution_count": 5,
226226
"metadata": {},
227227
"output_type": "execute_result"
228228
}
@@ -248,7 +248,7 @@
248248
},
249249
{
250250
"cell_type": "code",
251-
"execution_count": 9,
251+
"execution_count": 6,
252252
"metadata": {},
253253
"outputs": [],
254254
"source": [
@@ -259,7 +259,7 @@
259259
},
260260
{
261261
"cell_type": "code",
262-
"execution_count": 16,
262+
"execution_count": 7,
263263
"metadata": {},
264264
"outputs": [],
265265
"source": [
@@ -273,7 +273,7 @@
273273
},
274274
{
275275
"cell_type": "code",
276-
"execution_count": 17,
276+
"execution_count": 8,
277277
"metadata": {},
278278
"outputs": [
279279
{
@@ -293,7 +293,7 @@
293293
" 8 | 160 | 20 | 0.0123935101 | f\n",
294294
" 9 | 180 | 20 | 0.0488020532 | nadir\n",
295295
" 10 | 200 | 20 | 0.0176305024 | f\n",
296-
"The simulation took 1.103 minutes.\n"
296+
"The simulation took 1.072 minutes.\n"
297297
]
298298
}
299299
],
@@ -314,7 +314,7 @@
314314
},
315315
{
316316
"cell_type": "code",
317-
"execution_count": 18,
317+
"execution_count": 9,
318318
"metadata": {},
319319
"outputs": [
320320
{
@@ -353,7 +353,7 @@
353353
},
354354
{
355355
"cell_type": "code",
356-
"execution_count": 34,
356+
"execution_count": 10,
357357
"metadata": {},
358358
"outputs": [],
359359
"source": [
@@ -369,7 +369,7 @@
369369
},
370370
{
371371
"cell_type": "code",
372-
"execution_count": 20,
372+
"execution_count": 11,
373373
"metadata": {},
374374
"outputs": [
375375
{
@@ -389,7 +389,7 @@
389389
" 8 | 160 | 1 | 0.000000E+00 | 0.000000E+00 | 0.000000E+00 | f\n",
390390
" 9 | 180 | 1 | 0.000000E+00 | 0.000000E+00 | 0.000000E+00 | f\n",
391391
" 10 | 200 | 1 | 0.000000E+00 | 0.000000E+00 | 0.0035921908 | ideal\n",
392-
"The simulation took 1.120 minutes.\n"
392+
"The simulation took 1.095 minutes.\n"
393393
]
394394
}
395395
],
@@ -417,7 +417,7 @@
417417
},
418418
{
419419
"cell_type": "code",
420-
"execution_count": 22,
420+
"execution_count": 12,
421421
"metadata": {},
422422
"outputs": [
423423
{
@@ -461,7 +461,7 @@
461461
},
462462
{
463463
"cell_type": "code",
464-
"execution_count": 30,
464+
"execution_count": 13,
465465
"metadata": {},
466466
"outputs": [],
467467
"source": [
@@ -470,7 +470,7 @@
470470
},
471471
{
472472
"cell_type": "code",
473-
"execution_count": 31,
473+
"execution_count": 14,
474474
"metadata": {},
475475
"outputs": [],
476476
"source": [
@@ -487,7 +487,7 @@
487487
},
488488
{
489489
"cell_type": "code",
490-
"execution_count": 38,
490+
"execution_count": 15,
491491
"metadata": {},
492492
"outputs": [
493493
{
@@ -534,7 +534,7 @@
534534
},
535535
{
536536
"cell_type": "code",
537-
"execution_count": 39,
537+
"execution_count": 16,
538538
"metadata": {},
539539
"outputs": [],
540540
"source": [
@@ -550,7 +550,7 @@
550550
},
551551
{
552552
"cell_type": "code",
553-
"execution_count": 40,
553+
"execution_count": 17,
554554
"metadata": {},
555555
"outputs": [
556556
{
@@ -570,7 +570,7 @@
570570
" 8 | 160 | 18 | 0.000000E+00 | 0.000000E+00 | 0.0367281977 | ideal\n",
571571
" 9 | 180 | 20 | 0.000000E+00 | 0.000000E+00 | 0.0147077342 | f\n",
572572
" 10 | 200 | 20 | 0.000000E+00 | 0.000000E+00 | 0.0072011434 | nadir\n",
573-
"The simulation took 1.095 minutes.\n"
573+
"The simulation took 1.110 minutes.\n"
574574
]
575575
}
576576
],
@@ -591,7 +591,7 @@
591591
},
592592
{
593593
"cell_type": "code",
594-
"execution_count": 46,
594+
"execution_count": 18,
595595
"metadata": {},
596596
"outputs": [
597597
{
@@ -632,18 +632,6 @@
632632
"\n",
633633
"Once again, it looks like the constrained model is not quite as \"converged\" as the unconstrained model since the latter shows some cheaper and lower emissions solutions. The example further illustrates how ``Osier`` can use \"objective\" functions as objectives and/or constraints!"
634634
]
635-
},
636-
{
637-
"cell_type": "code",
638-
"execution_count": null,
639-
"metadata": {},
640-
"outputs": [],
641-
"source": []
642-
},
643-
{
644-
"cell_type": "markdown",
645-
"metadata": {},
646-
"source": []
647635
}
648636
],
649637
"metadata": {

0 commit comments

Comments
 (0)