From 6db771e0386dda7bdb809b8ff4b8f90fdc89b676 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Tue, 14 Jan 2025 11:20:58 -0700 Subject: [PATCH] Map an additional -0.000 -> 0.000 --- doc/OnlineDocs/explanation/analysis/sensitivity_toolbox.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/OnlineDocs/explanation/analysis/sensitivity_toolbox.rst b/doc/OnlineDocs/explanation/analysis/sensitivity_toolbox.rst index 8be6db90ead..6d3bbea426a 100644 --- a/doc/OnlineDocs/explanation/analysis/sensitivity_toolbox.rst +++ b/doc/OnlineDocs/explanation/analysis/sensitivity_toolbox.rst @@ -76,6 +76,8 @@ And finally we call sIPOPT or k_aug: for _m in (m, m_sipopt, m_kaug_dsdp): if f'{_m.x3():.3f}' == '-0.000': _m.x3 = 0. + if f'{m_sipopt.sens_sol_state_1[m_sipopt.x3]:.3f}' == '-0.000': + m_sipopt.sens_sol_state_1[m_sipopt.x3] = 0. The first argument specifies the method, either 'sipopt' or 'k_aug'. The second argument is the Pyomo model. The third argument is a list of the original parameters. The fourth argument is a list of the perturbed parameters. It's important that these two lists are the same length and in the same order.