Skip to content

Commit

Permalink
Rerun examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jinningwang committed Nov 24, 2024
1 parent e184f8a commit 7ff9a72
Show file tree
Hide file tree
Showing 11 changed files with 732 additions and 485 deletions.
112 changes: 70 additions & 42 deletions examples/demonstration/demo_AGC.ipynb

Large diffs are not rendered by default.

46 changes: 26 additions & 20 deletions examples/demonstration/demo_ESD1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Last run time: 2024-06-18 20:15:02\n",
"ams:0.9.8\n"
"Last run time: 2024-11-24 17:51:59\n",
"ams:0.9.12\n"
]
}
],
Expand Down Expand Up @@ -76,10 +76,11 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Parsing input file \"/Users/jinningwang/Documents/work/mambaforge/envs/amsre/lib/python3.9/site-packages/ams/cases/5bus/pjm5bus_uced_esd1.xlsx\"...\n",
"Input file parsed in 0.1104 seconds.\n",
"Working directory: \"/Users/jinningwang/work/ams/examples/demonstration\"\n",
"Parsing input file \"/Users/jinningwang/work/miniconda3/envs/amsre/lib/python3.12/site-packages/ams/cases/5bus/pjm5bus_uced_esd1.xlsx\"...\n",
"Input file parsed in 0.0237 seconds.\n",
"Zero line rates detacted in rate_b, rate_c, adjusted to 999.\n",
"System set up in 0.0027 seconds.\n"
"System set up in 0.0020 seconds.\n"
]
}
],
Expand Down Expand Up @@ -218,8 +219,12 @@
"name": "stderr",
"output_type": "stream",
"text": [
"<RTEDES> initialized in 0.0205 seconds.\n",
"<RTEDES> solved as optimal in 0.0260 seconds, converged in -1 iteration with SCIP.\n"
"Building system matrices\n",
"Parsing OModel for <RTEDES>\n",
"Evaluating OModel for <RTEDES>\n",
"Finalizing OModel for <RTEDES>\n",
"<RTEDES> initialized in 0.0148 seconds.\n",
"<RTEDES> solved as optimal in 0.0380 seconds, converged in -1 iteration with SCIP.\n"
]
},
{
Expand Down Expand Up @@ -315,8 +320,11 @@
"name": "stderr",
"output_type": "stream",
"text": [
"<EDES> initialized in 0.0268 seconds.\n",
"<EDES> solved as optimal in 0.0457 seconds, converged in -1 iteration with SCIP.\n"
"Parsing OModel for <EDES>\n",
"Evaluating OModel for <EDES>\n",
"Finalizing OModel for <EDES>\n",
"<EDES> initialized in 0.0196 seconds.\n",
"<EDES> solved as optimal in 0.0857 seconds, converged in -1 iteration with SCIP.\n"
]
},
{
Expand Down Expand Up @@ -377,9 +385,12 @@
"output_type": "stream",
"text": [
"All generators are online at initial, make initial guess for commitment.\n",
"Turn off StaticGen ['PV_1'] as initial commitment guess.\n",
"<UCES> initialized in 0.0289 seconds.\n",
"<UCES> solved as optimal in 0.0850 seconds, converged in -1 iteration with SCIP.\n"
"As initial commitment guess, turn off StaticGen: PV_1\n",
"Parsing OModel for <UCES>\n",
"Evaluating OModel for <UCES>\n",
"Finalizing OModel for <UCES>\n",
"<UCES> initialized in 0.0379 seconds.\n",
"<UCES> solved as optimal in 0.0646 seconds, converged in -1 iteration with SCIP.\n"
]
},
{
Expand Down Expand Up @@ -433,7 +444,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "ams",
"display_name": "amsre",
"language": "python",
"name": "python3"
},
Expand All @@ -447,14 +458,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.12.0"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "d2b3bf80176349caa68dc4a3c77bd06eaade8abc678330f7d1c813c53380e5d2"
}
}
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
Expand Down
33 changes: 14 additions & 19 deletions examples/demonstration/demo_debug.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generating code for 1 models on 12 processes.\n"
]
}
],
"outputs": [],
"source": [
"import ams"
]
Expand All @@ -36,7 +28,7 @@
{
"data": {
"text/plain": [
"'0.9.12rc1.post5.dev0+gc3478b86'"
"'0.9.12'"
]
},
"execution_count": 2,
Expand Down Expand Up @@ -73,15 +65,18 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Parsing input file \"/Users/jinningwang/work/ams/ams/cases/matpower/case14.m\"...\n",
"Input file parsed in 0.0042 seconds.\n",
"Working directory: \"/Users/jinningwang/work/ams/examples/demonstration\"\n",
"Parsing input file \"/Users/jinningwang/work/miniconda3/envs/amsre/lib/python3.12/site-packages/ams/cases/matpower/case14.m\"...\n",
"CASE14 Power flow data for IEEE 14 bus test case.\n",
"Input file parsed in 0.0034 seconds.\n",
"Zero line rates detacted in rate_a, rate_b, rate_c, adjusted to 999.\n",
"System set up in 0.0020 seconds.\n"
]
}
],
"source": [
"sp = ams.load(ams.get_case('matpower/case14.m'))"
"sp = ams.load(ams.get_case('matpower/case14.m'),\n",
" no_output=True)"
]
},
{
Expand All @@ -97,8 +92,8 @@
"Parsing OModel for <DCOPF>\n",
"Evaluating OModel for <DCOPF>\n",
"Finalizing OModel for <DCOPF>\n",
"<DCOPF> initialized in 0.0104 seconds.\n",
"<DCOPF> solved as optimal in 0.0084 seconds, converged in 11 iterations with CLARABEL.\n"
"<DCOPF> initialized in 0.0305 seconds.\n",
"<DCOPF> solved as optimal in 0.0113 seconds, converged in 11 iterations with CLARABEL.\n"
]
},
{
Expand Down Expand Up @@ -276,8 +271,8 @@
"text": [
"Disabled constraints: pglb, pgub\n",
"Finalizing OModel for <DCOPF>\n",
"<DCOPF> initialized in 0.0012 seconds.\n",
"<DCOPF> solved as optimal in 0.0066 seconds, converged in 9 iterations with CLARABEL.\n"
"<DCOPF> initialized in 0.0013 seconds.\n",
"<DCOPF> solved as optimal in 0.0055 seconds, converged in 9 iterations with CLARABEL.\n"
]
},
{
Expand Down Expand Up @@ -365,7 +360,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "ams",
"display_name": "amsre",
"language": "python",
"name": "python3"
},
Expand All @@ -379,7 +374,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
"version": "3.12.0"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 7ff9a72

Please sign in to comment.