From fd21db266d34922573abb1c98983406d0c52c97b Mon Sep 17 00:00:00 2001 From: jinningwang Date: Thu, 14 Nov 2024 21:57:53 -0500 Subject: [PATCH] Rerun --- examples/demonstration/demo_debug.ipynb | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/examples/demonstration/demo_debug.ipynb b/examples/demonstration/demo_debug.ipynb index 5e829418..0ca2948a 100644 --- a/examples/demonstration/demo_debug.ipynb +++ b/examples/demonstration/demo_debug.ipynb @@ -74,9 +74,9 @@ "output_type": "stream", "text": [ "Parsing input file \"/Users/jinningwang/work/ams/ams/cases/matpower/case14.m\"...\n", - "Input file parsed in 0.0043 seconds.\n", + "Input file parsed in 0.0042 seconds.\n", "Zero line rates detacted in rate_a, rate_b, rate_c, adjusted to 999.\n", - "System set up in 0.0024 seconds.\n" + "System set up in 0.0020 seconds.\n" ] } ], @@ -97,8 +97,8 @@ "Parsing OModel for \n", "Evaluating OModel for \n", "Finalizing OModel for \n", - " initialized in 0.0374 seconds.\n", - " solved as optimal in 0.0164 seconds, converged in 11 iterations with CLARABEL.\n" + " initialized in 0.0104 seconds.\n", + " solved as optimal in 0.0084 seconds, converged in 11 iterations with CLARABEL.\n" ] }, { @@ -145,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -206,7 +206,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "DCOPF failed as infeasible in 7 iterations with CLARABEL!\n" + "DCOPF failed as infeasible in 9 iterations with CLARABEL!\n" ] }, { @@ -276,8 +276,8 @@ "text": [ "Disabled constraints: pglb, pgub\n", "Finalizing OModel for \n", - " initialized in 0.0021 seconds.\n", - " solved as optimal in 0.0062 seconds, converged in 9 iterations with CLARABEL.\n" + " initialized in 0.0012 seconds.\n", + " solved as optimal in 0.0066 seconds, converged in 9 iterations with CLARABEL.\n" ] }, { @@ -315,6 +315,13 @@ "sp.DCOPF.pg.v" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Since all the inequality constraints are written in the form of $Ax -b \\leq 0$, we can check the violated constraints by finding the those with positive `Constraint.e`." + ] + }, { "cell_type": "code", "execution_count": 13, @@ -323,7 +330,7 @@ { "data": { "text/plain": [ - "array([ 2.01448356, 0.09836206, -0.34094854, -0.34094854, -0.34094854])" + "array([ 1.81448356, -0.10163794, -0.54094854, -0.54094854, -0.54094854])" ] }, "execution_count": 13,