Package: cog-suspect
Special Structure Detection for PyomoThis library implements methods to:Detect convex and concave expressionsDetect increasing and decreasing expressionsDetect linear, quadratic and polynomial expressionsTighten expression boundsPlease reference this software as@Article{Suspect2019,
author={Ceccon, Francesco and Siirola, John D. and Misener, Ruth},
title={{SUSPECT}:{MINLP}special structure detector for Pyomo},
journal={Optimization Letters},
year={2019},
month={Feb},
issn="1862-4480",
doi="10.1007/s11590-019-01396-y",
url="https://doi.org/10.1007/s11590-019-01396-y"}DocumentationDocumentation is available athttps://cog-imperial.github.io/suspect/InstallationSUSPECT requires Python 3.5 or later. We recommend installing SUSPECT in
a virtual environmentTo create the virtual environment run:$ python3 -m venv myenv
$ source myenv/bin/activateThen you are ready to clone and install SUSPECT:$ git clone https://github.com/cog-imperial/suspect.git
$ cd suspect
$ pip install -r requirements.txt
$ pip install .Command Line UsageThe package contains an utility to display structure information about
a single problem.You can run the utility as:model_summary.py -p /path/to/problem.osilor, if you want to check variables bounds include the solution:model_summary.py -p /path/to/problem.osil -s /path/to/problem.solThe repository also includes aDockerfileto simplify running the utility in
batch mode in a cloud environment. Refer to thebatchfolder for more information.Library Usagefromsuspectimportdetect_special_structure,create_connected_modelimportpyomo.environasamlmodel=aml.ConcreteModel()model.x=aml.Var()model.y=aml.Var()model.obj=aml.Objective(expr=(model.y-model.x)**3)model.c1=aml.Constraint(expr=model.y-model.x>=0)connected,_=create_connected_model(model)info=detect_special_structure(connected)# try info.variables, info.objectives, and info.constraintsprint(info.objectives['obj'])LicenseCopyright 2020 Francesco CecconLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.AcknowledgementsThis work was funded by an Engineering & Physical Sciences Research Council Research Fellowship to RM [Grant Number EP/P016871/1].Changelog2.1.3 (2021-08-13)More robust Pyomo usage2.1.2 (2021-02-16)Make SUSPECT compatible with Pyomo 5.7.2+2.1.1 (2020-11-13)Try to compute special structure even if bounds are missing2.1.0 (2020-09-16)Add support forlog10Improve handling of quadratic expressions in nonlinear problemsFix FBBT bug when handling some types of expressions2.0.2 (2020-09-01)Fix convexity on divisionHandle PyomoMonomialTermExpression2.0.1 (2020-07-01)Minor bug fixes2.0.0 (2020-04-28)Use Pyomo expressions to represent the DAGReplace DAG with connected_model1.6.0 (2019-11-15)Add floating point math modeMinor performance fixes1.1.0 (2019-01-31)Add Quadratic expression typeAdd Interval special case for x*xFix Interval sinAdd Interval comparison with numbers1.0.7 (2018-08-30)Add Interval absAdd Interval power1.0.6 (2018-07-05)Change ExpressionType and UnaryFunctionType to IntEnum1.0.5 (2018-07-05)Documentation improvements1.0.4 (2018-07-04)First public release. Yay!