Skip to content

Commit

Permalink
Solution check: expr types #200 #227
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Dec 20, 2023
1 parent 5da2fbb commit c15f29a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/source/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ model information.
NL Writer design
~~~~~~~~~~~~~~~~~~~~~~~~~~~

The library was designed with efficiency in mind.
It allows most efficient conversion of the user model
The library
allows a most efficient conversion of a user model's
internal representation to NL format by providing
NL component writer callbacks
(and solution reader callbacks to receive solutions.)
Expand Down
19 changes: 17 additions & 2 deletions doc/source/solution-check.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ see example below. To enable it for constraints, use
:ref:`option <solver-options>` ``chk:mode``.


Warning format
Warnings format
******************

Example
~~~~~~~~~~~~~~~~~~~~~~

To explain the solution check warning format, let's solve a relaxed version
of the following model:

Expand Down Expand Up @@ -117,13 +120,25 @@ It includes the number of violations (2), maximal absolute violation
and variable name, as well as maximal relative violation.

Paragraph ``Algebraic expression violations`` presents similar information,
for each expression type (in the case ``:linrange``.) Paragraph
for each expression type (see the :ref:`full list <constr-list>`). Paragraph
``Objective value violations`` does that for objectives.

The 2nd warning is ``Solution Check (Idealistic)``.
As the idealistic check is performed by default for objectives only,
this warning repeats the information about objective value violation.

.. _constr-list:

Expression list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The below table lists expression types which can be reported.

.. csv-table::
:file: tables/constr_list.csv
:widths: 5, 25, 70
:header-rows: 1


"Realistic" solution check
******************************
Expand Down
51 changes: 51 additions & 0 deletions doc/source/tables/constr_list.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
,"ID","Full name"
1,"abs","AbsConstraint"
2,"acos","AcosConstraint"
3,"acosh","AcoshConstraint"
4,"alldiff","AllDiffConstraint"
5,"and","AndConstraint"
6,"asin","AsinConstraint"
7,"asinh","AsinhConstraint"
8,"atan","AtanConstraint"
9,"atanh","AtanhConstraint"
10,"compl","ComplementarityLinear"
11,"complquad","ComplementarityQuadratic"
12,"condlin(lt/le/eq/ge/gt)","Conditional linear constraint"
13,"condquad(lt/le/eq/ge/gt)","Conditional quadratic constraint"
14,"cos","CosConstraint"
15,"cosh","CoshConstraint"
16,"count","CountConstraint"
17,"div","DivConstraint"
18,"expa","ExpAConstraint"
19,"exp","ExpConstraint"
20,"expcone","ExponentialConeConstraint"
21,"geomcone","GeometricConeConstraint"
22,"ifthen","IfThenConstraint"
23,"impl","ImplicationConstraint"
24,"ind(le/eq/ge)","Linear indicator constraint"
25,"indquad(le/eq/ge)","Quadratic indicator constraint"
26,"lin(le/eq/ge)","Linear constraint"
27,"linrange","Linear range constraint"
28,"linfunccon","LinearFunctionalConstraint"
29,"loga","LogAConstraint"
30,"log","LogConstraint"
31,"max","MaxConstraint"
32,"min","MinConstraint"
33,"not","NotConstraint"
34,"numberofconst","NumberofConstConstraint"
35,"numberofvar","NumberofVarConstraint"
36,"or","OrConstraint"
37,"pl","PLConstraint"
38,"pow","PowConstraint"
39,"powercone","PowerConeConstraint"
40,"quad(le/eq/ge)","Quadratic constraint"
41,"quadrange","Quadratic range constraint"
42,"quadcone","QuadraticConeConstraint"
43,"quadfunccon","QuadraticFunctionalConstraint"
44,"rotatedquadcone","RotatedQuadraticConeConstraint"
45,"sos1","SOS1Constraint"
46,"sos2","SOS2Constraint"
47,"sin","SinConstraint"
48,"sinh","SinhConstraint"
49,"tan","TanConstraint"
50,"tanh","TanhConstraint"

0 comments on commit c15f29a

Please sign in to comment.