diff --git a/src/Test/MINLPTests/nlp_cvx_expr_001_010.json b/src/Test/MINLPTests/nlp_cvx_expr_001_010.json new file mode 100644 index 0000000000..f31c5fb909 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_001_010.json @@ -0,0 +1 @@ +{"primal":{"x":-2.043010752688172,"y":-0.43010752688172044},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":3.0,"variable":"x"},{"coefficient":9.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":-10.0,"type":"GreaterThan"}},{"name":"c2","function":{"constant":0.0,"terms":[{"coefficient":10.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":-20.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":5.0}},{"name":"c2_1","function":{"constant":0.0,"terms":[{"coefficient":2.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":3.0}},{"name":"c3","function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":2.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":8.0}}],"objective":{"function":{"name":"x","type":"Variable"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-2.043010752688172,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_001_011.json b/src/Test/MINLPTests/nlp_cvx_expr_001_011.json new file mode 100644 index 0000000000..e0531de3ff --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_001_011.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":3.0,"variable":"x"},{"coefficient":9.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":-10.0,"type":"GreaterThan"}},{"name":"c2","function":{"constant":0.0,"terms":[{"coefficient":10.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":-20.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":5.0}},{"name":"c2_1","function":{"constant":0.0,"terms":[{"coefficient":2.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":3.0}},{"name":"c3","function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":2.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":8.0}}],"objective":{"function":{"constant":5.0,"affine_terms":[{"coefficient":-2.0,"variable":"x"},{"coefficient":-4.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_002_010.json b/src/Test/MINLPTests/nlp_cvx_expr_002_010.json new file mode 100644 index 0000000000..93c2393a83 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_002_010.json @@ -0,0 +1 @@ +{"primal":{"x":2.4137930845761546,"y":1.5517241221264648},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":3.0,"variable":"x"},{"coefficient":5.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":15.0,"type":"GreaterThan"}},{"name":"c2","function":{"constant":0.0,"terms":[{"coefficient":7.0,"variable":"x"},{"coefficient":2.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":20.0,"type":"GreaterThan"}},{"name":"c3","function":{"constant":0.0,"terms":[{"coefficient":9.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":20.0,"type":"GreaterThan"}},{"name":"c4","function":{"constant":0.0,"terms":[{"coefficient":3.0,"variable":"x"},{"coefficient":7.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":17.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-3.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":3.0}},{"name":"c2_1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-5.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":3.9655172067026196,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_002_011.json b/src/Test/MINLPTests/nlp_cvx_expr_002_011.json new file mode 100644 index 0000000000..1d2b56380c --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_002_011.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":3.0,"variable":"x"},{"coefficient":5.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":15.0,"type":"GreaterThan"}},{"name":"c2","function":{"constant":0.0,"terms":[{"coefficient":7.0,"variable":"x"},{"coefficient":2.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":20.0,"type":"GreaterThan"}},{"name":"c3","function":{"constant":0.0,"terms":[{"coefficient":9.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":20.0,"type":"GreaterThan"}},{"name":"c4","function":{"constant":0.0,"terms":[{"coefficient":3.0,"variable":"x"},{"coefficient":7.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":17.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-3.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":3.0}},{"name":"c2_1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-5.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":13.0,"affine_terms":[{"coefficient":-6.0,"variable":"x"},{"coefficient":-4.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_101_010.json b/src/Test/MINLPTests/nlp_cvx_expr_101_010.json new file mode 100644 index 0000000000..60aab7728c --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_101_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.707106783469219,"y":0.707106783469219},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-2.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":-2.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":2.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":2.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.414213566938438,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_101_011.json b/src/Test/MINLPTests/nlp_cvx_expr_101_011.json new file mode 100644 index 0000000000..5966016422 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_101_011.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-2.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":-2.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":2.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":2.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_101_012.json b/src/Test/MINLPTests/nlp_cvx_expr_101_012.json new file mode 100644 index 0000000000..6fe1c902a7 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_101_012.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-2.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":-2.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":2.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":2.0}}],"objective":{"function":{"name":"x","type":"Variable"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_102_010.json b/src/Test/MINLPTests/nlp_cvx_expr_102_010.json new file mode 100644 index 0000000000..4a652df859 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_102_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.9741657437159129,"y":0.2258342542139506},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":1.2,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.9741657437159129,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_102_011.json b/src/Test/MINLPTests/nlp_cvx_expr_102_011.json new file mode 100644 index 0000000000..2e606eb007 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_102_011.json @@ -0,0 +1 @@ +{"is_primal_unique":false,"primal":{"x":0.6,"y":0.6},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":1.2,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":1.2,"is_feasible":true} diff --git a/src/Test/MINLPTests/nlp_cvx_expr_102_012.json b/src/Test/MINLPTests/nlp_cvx_expr_102_012.json new file mode 100644 index 0000000000..ee654db264 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_102_012.json @@ -0,0 +1 @@ +{"primal":{"x":0.707106783460569,"y":0.707106783460569},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":1.2,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.414213566921138,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_102_013.json b/src/Test/MINLPTests/nlp_cvx_expr_102_013.json new file mode 100644 index 0000000000..c1eaafcbc6 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_102_013.json @@ -0,0 +1 @@ +{"primal":{"x":0.6,"y":0.6},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":1.2,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.72,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_102_014.json b/src/Test/MINLPTests/nlp_cvx_expr_102_014.json new file mode 100644 index 0000000000..d61ee0ec06 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_102_014.json @@ -0,0 +1 @@ +{"primal":{"x":0.65,"y":0.65},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"set":{"lower":1.2,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.8450000000000001,"affine_terms":[{"coefficient":-1.3,"variable":"x"},{"coefficient":-1.3,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_103_010.json b/src/Test/MINLPTests/nlp_cvx_expr_103_010.json new file mode 100644 index 0000000000..f6f538d3c7 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_103_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.0,"y":-0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"name":"y","type":"Variable"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_103_011.json b/src/Test/MINLPTests/nlp_cvx_expr_103_011.json new file mode 100644 index 0000000000..794f8697a1 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_103_011.json @@ -0,0 +1 @@ +{"primal":{"x":0.0,"y":1.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_103_012.json b/src/Test/MINLPTests/nlp_cvx_expr_103_012.json new file mode 100644 index 0000000000..a6567c90d1 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_103_012.json @@ -0,0 +1 @@ +{"primal":{"x":0.5,"y":0.75},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.25,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_103_013.json b/src/Test/MINLPTests/nlp_cvx_expr_103_013.json new file mode 100644 index 0000000000..8eac4d9739 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_103_013.json @@ -0,0 +1 @@ +{"primal":{"x":-0.5,"y":0.25},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.25,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_103_014.json b/src/Test/MINLPTests/nlp_cvx_expr_103_014.json new file mode 100644 index 0000000000..e9f41de033 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_103_014.json @@ -0,0 +1 @@ +{"primal":{"x":0.7071067832361848,"y":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.7071067832361848,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_104_010.json b/src/Test/MINLPTests/nlp_cvx_expr_104_010.json new file mode 100644 index 0000000000..5d262552b6 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_104_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.7071067832574013,"y":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.75}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.7071067832574013,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_105_010.json b/src/Test/MINLPTests/nlp_cvx_expr_105_010.json new file mode 100644 index 0000000000..fd22afae08 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_105_010.json @@ -0,0 +1 @@ +{"primal":{"x":2.687422019398147,"y":1.488582385638499},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"},{"args":[{"type":"node","index":1},0.5],"type":"+"},{"args":[{"type":"node","index":2},"y"],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},0.5],"type":"-"},{"args":[{"type":"node","index":4},"y"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-4.176004405036646,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_105_011.json b/src/Test/MINLPTests/nlp_cvx_expr_105_011.json new file mode 100644 index 0000000000..ce440c91d9 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_105_011.json @@ -0,0 +1 @@ +{"primal":{"x":0.45538805755556067,"y":-0.28660534387399694},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"},{"args":[{"type":"node","index":1},0.5],"type":"+"},{"args":[{"type":"node","index":2},"y"],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},0.5],"type":"-"},{"args":[{"type":"node","index":4},"y"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.16878271368156372,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_105_012.json b/src/Test/MINLPTests/nlp_cvx_expr_105_012.json new file mode 100644 index 0000000000..7dfd9ddbdf --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_105_012.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"y":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"},{"args":[{"type":"node","index":1},0.5],"type":"+"},{"args":[{"type":"node","index":2},"y"],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},0.5],"type":"-"},{"args":[{"type":"node","index":4},"y"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.5,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_105_013.json b/src/Test/MINLPTests/nlp_cvx_expr_105_013.json new file mode 100644 index 0000000000..cdf2223fba --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_105_013.json @@ -0,0 +1 @@ +{"primal":{"x":2.0,"y":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"},{"args":[{"type":"node","index":1},0.5],"type":"+"},{"args":[{"type":"node","index":2},"y"],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},0.5],"type":"-"},{"args":[{"type":"node","index":4},"y"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.5,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_106_010.json b/src/Test/MINLPTests/nlp_cvx_expr_106_010.json new file mode 100644 index 0000000000..07a8d12d76 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_106_010.json @@ -0,0 +1 @@ +{"primal":{"x":1.369771397573293,"y":0.48744411528277953},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":8},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-0.5],"type":"+"},{"args":[{"type":"node","index":2}],"type":"cos"},{"args":[0.25,"x"],"type":"*"},{"args":[{"type":"node","index":4}],"type":"+"},{"args":[{"type":"node","index":3},{"type":"node","index":5}],"type":"+"},{"args":[{"type":"node","index":6},0.5],"type":"-"},{"args":[{"type":"node","index":7},"y"],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":7},"type":"ScalarNonlinearFunction","node_list":[{"args":[-1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-1.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"sin"},{"args":[0.5,"x"],"type":"*"},{"args":[{"type":"node","index":4}],"type":"+"},{"args":[{"type":"node","index":3},0.5,{"type":"node","index":5}],"type":"+"},{"args":[{"type":"node","index":6},"y"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-3.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":3.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.8572155128560726,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_106_011.json b/src/Test/MINLPTests/nlp_cvx_expr_106_011.json new file mode 100644 index 0000000000..284dfe20be --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_106_011.json @@ -0,0 +1 @@ +{"primal":{"x":-0.5955231764565216,"y":-0.19129945013808877},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":8},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-0.5],"type":"+"},{"args":[{"type":"node","index":2}],"type":"cos"},{"args":[0.25,"x"],"type":"*"},{"args":[{"type":"node","index":4}],"type":"+"},{"args":[{"type":"node","index":3},{"type":"node","index":5}],"type":"+"},{"args":[{"type":"node","index":6},0.5],"type":"-"},{"args":[{"type":"node","index":7},"y"],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":7},"type":"ScalarNonlinearFunction","node_list":[{"args":[-1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-1.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"sin"},{"args":[0.5,"x"],"type":"*"},{"args":[{"type":"node","index":4}],"type":"+"},{"args":[{"type":"node","index":3},0.5,{"type":"node","index":5}],"type":"+"},{"args":[{"type":"node","index":6},"y"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-3.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":3.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.7868226265946104,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_107_010.json b/src/Test/MINLPTests/nlp_cvx_expr_107_010.json new file mode 100644 index 0000000000..240650a75b --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_107_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.5,"y":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.5,"affine_terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_107_011.json b/src/Test/MINLPTests/nlp_cvx_expr_107_011.json new file mode 100644 index 0000000000..4d5c7e191e --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_107_011.json @@ -0,0 +1 @@ +{"primal":{"x":0.7071067825718402,"y":0.7071067825718402},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":2.0,"affine_terms":[{"coefficient":-2.0,"variable":"x"},{"coefficient":-2.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.17157287363083862,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_107_012.json b/src/Test/MINLPTests/nlp_cvx_expr_107_012.json new file mode 100644 index 0000000000..5b87c99834 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_107_012.json @@ -0,0 +1 @@ +{"primal":{"x":0.7071067825718351,"y":0.7071067825718351},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":1.5},{"name":"y","primal_start":0.5}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":2.0,"affine_terms":[{"coefficient":-2.0,"variable":"x"},{"coefficient":-2.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.1715728736308446,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_108_010.json b/src/Test/MINLPTests/nlp_cvx_expr_108_010.json new file mode 100644 index 0000000000..615d0d3056 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_108_010.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"y":0.75},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-4.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":4.0},{"variable_1":"x","variable_2":"y","coefficient":-4.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-4.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":2.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":1.5625,"affine_terms":[{"coefficient":-2.0,"variable":"x"},{"coefficient":-1.5,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_108_011.json b/src/Test/MINLPTests/nlp_cvx_expr_108_011.json new file mode 100644 index 0000000000..afd4cbfdd7 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_108_011.json @@ -0,0 +1 @@ +{"primal":{"x":1.8344380402868472,"y":0.40689307976351835},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-4.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":4.0},{"variable_1":"x","variable_2":"y","coefficient":-4.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-4.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":2.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":9.0,"affine_terms":[{"coefficient":-6.0,"variable":"x"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":1.524096660289806,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_108_012.json b/src/Test/MINLPTests/nlp_cvx_expr_108_012.json new file mode 100644 index 0000000000..5de089e9e7 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_108_012.json @@ -0,0 +1 @@ +{"primal":{"x":0.31567986098624,"y":1.297813605780176},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-4.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":4.0},{"variable_1":"x","variable_2":"y","coefficient":-4.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-4.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":2.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":4.0,"affine_terms":[{"coefficient":-4.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.59271950685973,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_108_013.json b/src/Test/MINLPTests/nlp_cvx_expr_108_013.json new file mode 100644 index 0000000000..52f2309479 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_108_013.json @@ -0,0 +1 @@ +{"primal":{"x":0.6557120858371006,"y":0.6174888074289212},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-4.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":4.0},{"variable_1":"x","variable_2":"y","coefficient":-4.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-4.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":2.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.8112507668128326,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_109_010.json b/src/Test/MINLPTests/nlp_cvx_expr_109_010.json new file mode 100644 index 0000000000..1d176bc4c7 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_109_010.json @@ -0,0 +1 @@ +{"primal":{"x":2.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y","primal_start":0.1}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-4.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-2.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":1.0e-5,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":1.0e-5,"type":"GreaterThan"}}],"objective":{"function":{"root":{"type":"node","index":1},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":0.6931471880476151,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_109_011.json b/src/Test/MINLPTests/nlp_cvx_expr_109_011.json new file mode 100644 index 0000000000..f35adf64e0 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_109_011.json @@ -0,0 +1 @@ +{"primal":{"x":1.8499011957685119,"y":2.3874258891507627},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y","primal_start":0.1}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-4.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-2.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":1.0e-5,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":1.0e-5,"type":"GreaterThan"}}],"objective":{"function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"},{"args":["y"],"type":"log"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"+"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.4853479816688582,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_109_012.json b/src/Test/MINLPTests/nlp_cvx_expr_109_012.json new file mode 100644 index 0000000000..23c88e2bc4 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_109_012.json @@ -0,0 +1 @@ +{"primal":{"x":1.75,"y":2.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y","primal_start":0.1}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":-4.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-2.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":1.0e-5,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":1.0e-5,"type":"GreaterThan"}}],"objective":{"function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[1.0,"y"],"type":"*"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"+"},{"args":[{"type":"node","index":3}],"type":"log"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.4469189851245425,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_110_010.json b/src/Test/MINLPTests/nlp_cvx_expr_110_010.json new file mode 100644 index 0000000000..28ec581c8c --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_110_010.json @@ -0,0 +1 @@ +{"primal":{"x":-1.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"root":{"type":"node","index":1},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"exp"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.36787944185279176,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_110_011.json b/src/Test/MINLPTests/nlp_cvx_expr_110_011.json new file mode 100644 index 0000000000..3e4acadaa4 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_110_011.json @@ -0,0 +1 @@ +{"primal":{"x":-0.7071067821748245,"y":-0.7071067821748245},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"exp"},{"args":["y"],"type":"exp"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"+"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.9861373818159027,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_110_012.json b/src/Test/MINLPTests/nlp_cvx_expr_110_012.json new file mode 100644 index 0000000000..3c859f5353 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_110_012.json @@ -0,0 +1 @@ +{"primal":{"x":-0.7071067795246058,"y":-0.7071067795246058},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[1.0,"y"],"type":"*"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"+"},{"args":[{"type":"node","index":3}],"type":"exp"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.24311673524230593,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_201_010.json b/src/Test/MINLPTests/nlp_cvx_expr_201_010.json new file mode 100644 index 0000000000..4a9da2d6fc --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_201_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.5773502712407484,"z":0.5773502712407484,"y":0.5773502712407484},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":-0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"},{"coefficient":-1.0,"variable":"z"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.7320508137222452,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_201_011.json b/src/Test/MINLPTests/nlp_cvx_expr_201_011.json new file mode 100644 index 0000000000..1c31002663 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_201_011.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"z":0.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_202_010.json b/src/Test/MINLPTests/nlp_cvx_expr_202_010.json new file mode 100644 index 0000000000..7c95eec054 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_202_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.0,"z":1.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"z"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_202_011.json b/src/Test/MINLPTests/nlp_cvx_expr_202_011.json new file mode 100644 index 0000000000..6f3d1c4746 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_202_011.json @@ -0,0 +1 @@ +{"primal":{"x":0.0,"z":-0.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"name":"z","type":"Variable"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_202_012.json b/src/Test/MINLPTests/nlp_cvx_expr_202_012.json new file mode 100644 index 0000000000..50f1da8340 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_202_012.json @@ -0,0 +1 @@ +{"primal":{"x":0.25,"z":0.875,"y":0.25},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":-0.0,"terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"},{"coefficient":-2.0,"variable":"z"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-2.25,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_202_013.json b/src/Test/MINLPTests/nlp_cvx_expr_202_013.json new file mode 100644 index 0000000000..134f30bb4d --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_202_013.json @@ -0,0 +1 @@ +{"primal":{"x":-0.25,"z":0.125,"y":-0.25},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"},{"coefficient":2.0,"variable":"z"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.25,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_202_014.json b/src/Test/MINLPTests/nlp_cvx_expr_202_014.json new file mode 100644 index 0000000000..af17e3312c --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_202_014.json @@ -0,0 +1 @@ +{"primal":{"x":-0.5,"z":0.5,"y":-0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_203_010.json b/src/Test/MINLPTests/nlp_cvx_expr_203_010.json new file mode 100644 index 0000000000..2b90ef5df0 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_203_010.json @@ -0,0 +1 @@ +{"primal":{"x":-0.3535533951560543,"z":0.75,"y":-0.35355339515605433},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y","primal_start":0.1},{"name":"z"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":7},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x","x"],"type":"*"},{"args":[1.0,"y","y"],"type":"*"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"+"},{"args":[{"type":"node","index":3}],"type":"sqrt"},{"args":[1.0,"z"],"type":"*"},{"args":[{"type":"node","index":5},-0.25],"type":"+"},{"args":[{"type":"node","index":4},{"type":"node","index":6}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.7071067903121087,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_204_010.json b/src/Test/MINLPTests/nlp_cvx_expr_204_010.json new file mode 100644 index 0000000000..673f9e07cc --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_204_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.353553392657669,"z":0.1464466131720772,"y":0.8535533911341704},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z","primal_start":0.1}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x","x"],"type":"*"},{"args":[{"type":"node","index":1}],"type":"+"},{"args":[{"type":"node","index":2},"z"],"type":"/"},{"args":[{"type":"node","index":3},"y"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}},{"function":{"name":"z","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"y"},{"coefficient":-1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.2071067837918394,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_205_010.json b/src/Test/MINLPTests/nlp_cvx_expr_205_010.json new file mode 100644 index 0000000000..92bbf6cc2a --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_205_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.0,"z":1.7912878660666662,"y":1.7912878530409062},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y","primal_start":0.1},{"name":"z"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x","y"],"type":"/"},{"args":[{"type":"node","index":1}],"type":"exp"},{"args":["y",{"type":"node","index":2}],"type":"*"},{"args":[{"type":"node","index":3},"z"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"root":{"type":"node","index":6},"type":"ScalarNonlinearFunction","node_list":[{"args":[-1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1}],"type":"+"},{"args":[{"type":"node","index":2},"y"],"type":"/"},{"args":[{"type":"node","index":3}],"type":"exp"},{"args":["y",{"type":"node","index":4}],"type":"*"},{"args":[{"type":"node","index":5},"z"],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":5.0}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"name":"y","type":"Variable"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.7912878530409062,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_206_010.json b/src/Test/MINLPTests/nlp_cvx_expr_206_010.json new file mode 100644 index 0000000000..f686187f4a --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_206_010.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"z":1.0,"y":1.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":0.1},{"name":"y","primal_start":0.1},{"name":"z","primal_start":0.1}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x",0.3],"type":"^"},{"args":["y",0.7],"type":"^"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"*"},{"args":["z",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["z",0.7],"type":"^"},{"args":["y",0.3],"type":"^"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"*"},{"args":["x",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"z","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":2.0,"variable":"x"},{"coefficient":1.0,"variable":"y"},{"coefficient":1.0,"variable":"z"}],"type":"ScalarAffineFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":4.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_210_010.json b/src/Test/MINLPTests/nlp_cvx_expr_210_010.json new file mode 100644 index 0000000000..1e25f37d77 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_210_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.5,"z":0.5,"y":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.75,"affine_terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-1.0,"variable":"y"},{"coefficient":-1.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_210_011.json b/src/Test/MINLPTests/nlp_cvx_expr_210_011.json new file mode 100644 index 0000000000..8a91de7f8e --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_210_011.json @@ -0,0 +1 @@ +{"primal":{"x":0.5773502710864601,"z":0.5773502710864601,"y":0.5773502710864601},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":3.0,"affine_terms":[{"coefficient":-2.0,"variable":"x"},{"coefficient":-2.0,"variable":"y"},{"coefficient":-2.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.5358983800520662,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_210_012.json b/src/Test/MINLPTests/nlp_cvx_expr_210_012.json new file mode 100644 index 0000000000..bc1fb164b6 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_210_012.json @@ -0,0 +1 @@ +{"primal":{"x":0.577350271085347,"z":0.5773502710856162,"y":0.5773502710854816},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":1.5},{"name":"y","primal_start":1.0},{"name":"z","primal_start":0.5}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":3.0,"affine_terms":[{"coefficient":-2.0,"variable":"x"},{"coefficient":-2.0,"variable":"y"},{"coefficient":-2.0,"variable":"z"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.5358983800545476,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_501_010.json b/src/Test/MINLPTests/nlp_cvx_expr_501_010.json new file mode 100644 index 0000000000..17749293e1 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_501_010.json @@ -0,0 +1 @@ +{"primal":{"vars[6]":0.22360679874269881,"vars[7]":0.22360679874269881,"vars[19]":0.22360679874269881,"vars[1]":0.22360679874269881,"vars[17]":0.22360679874269881,"vars[12]":0.22360679874269881,"vars[5]":0.22360679874269881,"vars[16]":0.22360679874269881,"vars[10]":0.22360679874269881,"vars[20]":0.22360679874269881,"vars[3]":0.22360679874269881,"vars[11]":0.22360679874269881,"vars[13]":0.22360679874269881,"vars[2]":0.22360679874269881,"vars[4]":0.22360679874269881,"vars[9]":0.22360679874269881,"vars[14]":0.22360679874269881,"vars[8]":0.22360679874269881,"vars[15]":0.22360679874269881,"vars[18]":0.22360679874269881},"model":{"name":"MathOptFormat Model","variables":[{"name":"vars[1]"},{"name":"vars[2]"},{"name":"vars[3]"},{"name":"vars[4]"},{"name":"vars[5]"},{"name":"vars[6]"},{"name":"vars[7]"},{"name":"vars[8]"},{"name":"vars[9]"},{"name":"vars[10]"},{"name":"vars[11]"},{"name":"vars[12]"},{"name":"vars[13]"},{"name":"vars[14]"},{"name":"vars[15]"},{"name":"vars[16]"},{"name":"vars[17]"},{"name":"vars[18]"},{"name":"vars[19]"},{"name":"vars[20]"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"vars[1]","variable_2":"vars[1]","coefficient":2.0},{"variable_1":"vars[2]","variable_2":"vars[2]","coefficient":2.0},{"variable_1":"vars[3]","variable_2":"vars[3]","coefficient":2.0},{"variable_1":"vars[4]","variable_2":"vars[4]","coefficient":2.0},{"variable_1":"vars[5]","variable_2":"vars[5]","coefficient":2.0},{"variable_1":"vars[6]","variable_2":"vars[6]","coefficient":2.0},{"variable_1":"vars[7]","variable_2":"vars[7]","coefficient":2.0},{"variable_1":"vars[8]","variable_2":"vars[8]","coefficient":2.0},{"variable_1":"vars[9]","variable_2":"vars[9]","coefficient":2.0},{"variable_1":"vars[10]","variable_2":"vars[10]","coefficient":2.0},{"variable_1":"vars[11]","variable_2":"vars[11]","coefficient":2.0},{"variable_1":"vars[12]","variable_2":"vars[12]","coefficient":2.0},{"variable_1":"vars[13]","variable_2":"vars[13]","coefficient":2.0},{"variable_1":"vars[14]","variable_2":"vars[14]","coefficient":2.0},{"variable_1":"vars[15]","variable_2":"vars[15]","coefficient":2.0},{"variable_1":"vars[16]","variable_2":"vars[16]","coefficient":2.0},{"variable_1":"vars[17]","variable_2":"vars[17]","coefficient":2.0},{"variable_1":"vars[18]","variable_2":"vars[18]","coefficient":2.0},{"variable_1":"vars[19]","variable_2":"vars[19]","coefficient":2.0},{"variable_1":"vars[20]","variable_2":"vars[20]","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"vars[1]"},{"coefficient":-1.0,"variable":"vars[2]"},{"coefficient":-1.0,"variable":"vars[3]"},{"coefficient":-1.0,"variable":"vars[4]"},{"coefficient":-1.0,"variable":"vars[5]"},{"coefficient":-1.0,"variable":"vars[6]"},{"coefficient":-1.0,"variable":"vars[7]"},{"coefficient":-1.0,"variable":"vars[8]"},{"coefficient":-1.0,"variable":"vars[9]"},{"coefficient":-1.0,"variable":"vars[10]"},{"coefficient":-1.0,"variable":"vars[11]"},{"coefficient":-1.0,"variable":"vars[12]"},{"coefficient":-1.0,"variable":"vars[13]"},{"coefficient":-1.0,"variable":"vars[14]"},{"coefficient":-1.0,"variable":"vars[15]"},{"coefficient":-1.0,"variable":"vars[16]"},{"coefficient":-1.0,"variable":"vars[17]"},{"coefficient":-1.0,"variable":"vars[18]"},{"coefficient":-1.0,"variable":"vars[19]"},{"coefficient":-1.0,"variable":"vars[20]"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-4.472135974853976,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_cvx_expr_501_011.json b/src/Test/MINLPTests/nlp_cvx_expr_501_011.json new file mode 100644 index 0000000000..543a090ec6 --- /dev/null +++ b/src/Test/MINLPTests/nlp_cvx_expr_501_011.json @@ -0,0 +1 @@ +{"primal":{"vars[6]":0.22360679986075174,"vars[7]":0.22360679986075174,"vars[19]":0.22360679986075174,"vars[1]":0.22360679986075174,"vars[17]":0.22360679986075174,"vars[12]":0.22360679986075174,"vars[5]":0.22360679986075174,"vars[16]":0.22360679986075174,"vars[10]":0.22360679986075174,"vars[20]":0.22360679986075174,"vars[3]":0.22360679986075174,"vars[11]":0.22360679986075174,"vars[13]":0.22360679986075174,"vars[2]":0.22360679986075174,"vars[4]":0.22360679986075174,"vars[9]":0.22360679986075174,"vars[14]":0.22360679986075174,"vars[8]":0.22360679986075174,"vars[15]":0.22360679986075174,"vars[18]":0.22360679986075174},"model":{"name":"MathOptFormat Model","variables":[{"name":"vars[1]","primal_start":0.05},{"name":"vars[2]","primal_start":0.05},{"name":"vars[3]","primal_start":0.05},{"name":"vars[4]","primal_start":0.05},{"name":"vars[5]","primal_start":0.05},{"name":"vars[6]","primal_start":0.05},{"name":"vars[7]","primal_start":0.05},{"name":"vars[8]","primal_start":0.05},{"name":"vars[9]","primal_start":0.05},{"name":"vars[10]","primal_start":0.05},{"name":"vars[11]","primal_start":0.05},{"name":"vars[12]","primal_start":0.05},{"name":"vars[13]","primal_start":0.05},{"name":"vars[14]","primal_start":0.05},{"name":"vars[15]","primal_start":0.05},{"name":"vars[16]","primal_start":0.05},{"name":"vars[17]","primal_start":0.05},{"name":"vars[18]","primal_start":0.05},{"name":"vars[19]","primal_start":0.05},{"name":"vars[20]","primal_start":0.05}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":23},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"vars[1]","vars[1]"],"type":"*"},{"args":[1.0,"vars[2]","vars[2]"],"type":"*"},{"args":[1.0,"vars[3]","vars[3]"],"type":"*"},{"args":[1.0,"vars[4]","vars[4]"],"type":"*"},{"args":[1.0,"vars[5]","vars[5]"],"type":"*"},{"args":[1.0,"vars[6]","vars[6]"],"type":"*"},{"args":[1.0,"vars[7]","vars[7]"],"type":"*"},{"args":[1.0,"vars[8]","vars[8]"],"type":"*"},{"args":[1.0,"vars[9]","vars[9]"],"type":"*"},{"args":[1.0,"vars[10]","vars[10]"],"type":"*"},{"args":[1.0,"vars[11]","vars[11]"],"type":"*"},{"args":[1.0,"vars[12]","vars[12]"],"type":"*"},{"args":[1.0,"vars[13]","vars[13]"],"type":"*"},{"args":[1.0,"vars[14]","vars[14]"],"type":"*"},{"args":[1.0,"vars[15]","vars[15]"],"type":"*"},{"args":[1.0,"vars[16]","vars[16]"],"type":"*"},{"args":[1.0,"vars[17]","vars[17]"],"type":"*"},{"args":[1.0,"vars[18]","vars[18]"],"type":"*"},{"args":[1.0,"vars[19]","vars[19]"],"type":"*"},{"args":[1.0,"vars[20]","vars[20]"],"type":"*"},{"args":[{"type":"node","index":1},{"type":"node","index":2},{"type":"node","index":3},{"type":"node","index":4},{"type":"node","index":5},{"type":"node","index":6},{"type":"node","index":7},{"type":"node","index":8},{"type":"node","index":9},{"type":"node","index":10},{"type":"node","index":11},{"type":"node","index":12},{"type":"node","index":13},{"type":"node","index":14},{"type":"node","index":15},{"type":"node","index":16},{"type":"node","index":17},{"type":"node","index":18},{"type":"node","index":19},{"type":"node","index":20}],"type":"+"},{"args":[{"type":"node","index":21}],"type":"sqrt"},{"args":[{"type":"node","index":22},1.0],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":-1.0,"variable":"vars[1]"},{"coefficient":-1.0,"variable":"vars[2]"},{"coefficient":-1.0,"variable":"vars[3]"},{"coefficient":-1.0,"variable":"vars[4]"},{"coefficient":-1.0,"variable":"vars[5]"},{"coefficient":-1.0,"variable":"vars[6]"},{"coefficient":-1.0,"variable":"vars[7]"},{"coefficient":-1.0,"variable":"vars[8]"},{"coefficient":-1.0,"variable":"vars[9]"},{"coefficient":-1.0,"variable":"vars[10]"},{"coefficient":-1.0,"variable":"vars[11]"},{"coefficient":-1.0,"variable":"vars[12]"},{"coefficient":-1.0,"variable":"vars[13]"},{"coefficient":-1.0,"variable":"vars[14]"},{"coefficient":-1.0,"variable":"vars[15]"},{"coefficient":-1.0,"variable":"vars[16]"},{"coefficient":-1.0,"variable":"vars[17]"},{"coefficient":-1.0,"variable":"vars[18]"},{"coefficient":-1.0,"variable":"vars[19]"},{"coefficient":-1.0,"variable":"vars[20]"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-4.472135997215035,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_001_010.json b/src/Test/MINLPTests/nlp_expr_001_010.json new file mode 100644 index 0000000000..6b6f4abc09 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_001_010.json @@ -0,0 +1 @@ +{"primal":{"x":-1.0,"z":1.0,"y":3.141592653589793},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":1.0},{"name":"y","primal_start":2.12},{"name":"z"}],"constraints":[{"function":{"name":"y","type":"Variable"},"set":{"lower":-1.5707963267948966,"type":"GreaterThan"}},{"function":{"name":"z","type":"Variable"},"set":{"lower":1.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":7.853981633974483}}],"objective":{"function":{"root":{"type":"node","index":8},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"exp"},{"args":["x",{"type":"node","index":1}],"type":"*"},{"args":["z",3],"type":"^"},{"args":["y"],"type":"cos"},{"args":[{"type":"node","index":2},{"type":"node","index":3},{"type":"node","index":4}],"type":"+"},{"args":[1.0,"z","z"],"type":"*"},{"args":[{"type":"node","index":6}],"type":"+"},{"args":[{"type":"node","index":5},{"type":"node","index":7}],"type":"-"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-1.3678794486503107,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_002_010.json b/src/Test/MINLPTests/nlp_expr_002_010.json new file mode 100644 index 0000000000..272e8d0e43 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_002_010.json @@ -0,0 +1 @@ +{"primal":{"x":2.1285148443189033,"y":0.6554244804634232},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":1.0},{"name":"y","primal_start":-1.12}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"},{"args":[{"type":"node","index":1},0.1],"type":"-"},{"args":["y",{"type":"node","index":2}],"type":"-"}]},"set":{"value":0.0,"type":"EqualTo"}},{"name":"c2","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["y"],"type":"cos"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},1.5],"type":"+"},{"args":["x",{"type":"node","index":3}],"type":"-"}]},"set":{"value":0.0,"type":"EqualTo"}}],"objective":{"sense":"feasibility"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_003_010.json b/src/Test/MINLPTests/nlp_expr_003_010.json new file mode 100644 index 0000000000..226e4da6bb --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_003_010.json @@ -0,0 +1 @@ +{"primal":{"x":3.2565126525233166,"y":2.013148549981813},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}}],"objective":{"function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},0.1],"type":"+"},{"args":[{"type":"node","index":2}],"type":"sqrt"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.8320787790166984,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_003_011.json b/src/Test/MINLPTests/nlp_expr_003_011.json new file mode 100644 index 0000000000..7d2daff6d1 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_003_011.json @@ -0,0 +1 @@ +{"primal":{"x":3.2565126525233166,"y":2.013148549981813},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}}],"objective":{"function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},0.1],"type":"+"},{"args":[{"type":"node","index":2}],"type":"sqrt"},{"args":[{"type":"node","index":3},3.141592653589793],"type":"+"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":4.9736714326064915,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_003_012.json b/src/Test/MINLPTests/nlp_expr_003_012.json new file mode 100644 index 0000000000..acd539084d --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_003_012.json @@ -0,0 +1 @@ +{"primal":{"x":3.2565126658322425,"y":2.013148575072847},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}}],"objective":{"function":{"name":"x","type":"Variable"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":3.2565126658322425,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_003_013.json b/src/Test/MINLPTests/nlp_expr_003_013.json new file mode 100644 index 0000000000..acd539084d --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_003_013.json @@ -0,0 +1 @@ +{"primal":{"x":3.2565126658322425,"y":2.013148575072847},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}}],"objective":{"function":{"name":"x","type":"Variable"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":3.2565126658322425,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_003_014.json b/src/Test/MINLPTests/nlp_expr_003_014.json new file mode 100644 index 0000000000..c8711d3328 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_003_014.json @@ -0,0 +1 @@ +{"primal":{"x":3.2565126702182114,"y":2.0131485834941025},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}}],"objective":{"function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":12.618023354785848,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_003_016.json b/src/Test/MINLPTests/nlp_expr_003_016.json new file mode 100644 index 0000000000..8a3404d524 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_003_016.json @@ -0,0 +1 @@ +{"primal":{"x":3.2565126658322425,"y":2.013148575072847},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}}],"objective":{"function":{"constant":3.141592653589793,"terms":[{"coefficient":1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":6.398105319422036,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_004_010.json b/src/Test/MINLPTests/nlp_expr_004_010.json new file mode 100644 index 0000000000..66a7b718a1 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_004_010.json @@ -0,0 +1 @@ +{"primal":{"x":-1.0,"z":2.8567103958088906,"y":-0.9160817554094323},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":-1.2,"variable":"x"},{"coefficient":-1.0,"variable":"y"},{"coefficient":-0.7407407407407407,"variable":"z"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":10.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"root":{"type":"node","index":6},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"tan"},{"args":["y"],"type":"abs"},{"args":[0.5,{"type":"node","index":2}],"type":"*"},{"args":[1.0,"x","z"],"type":"*"},{"args":[{"type":"node","index":4}],"type":"+"},{"args":[{"type":"node","index":1},{"type":"node","index":3},{"type":"node","index":5},"y"],"type":"+"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-4.872159058240883,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_004_011.json b/src/Test/MINLPTests/nlp_expr_004_011.json new file mode 100644 index 0000000000..66a7b718a1 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_004_011.json @@ -0,0 +1 @@ +{"primal":{"x":-1.0,"z":2.8567103958088906,"y":-0.9160817554094323},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":-1.2,"variable":"x"},{"coefficient":-1.0,"variable":"y"},{"coefficient":-0.7407407407407407,"variable":"z"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":10.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"root":{"type":"node","index":6},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"tan"},{"args":["y"],"type":"abs"},{"args":[0.5,{"type":"node","index":2}],"type":"*"},{"args":[1.0,"x","z"],"type":"*"},{"args":[{"type":"node","index":4}],"type":"+"},{"args":[{"type":"node","index":1},{"type":"node","index":3},{"type":"node","index":5},"y"],"type":"+"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-4.872159058240883,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_005_010.json b/src/Test/MINLPTests/nlp_expr_005_010.json new file mode 100644 index 0000000000..3c21f64dc7 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_005_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.584897057137877,"y":0.9600790170143196},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},0.1],"type":"+"},{"args":[1.0,{"type":"node","index":2}],"type":"/"},{"args":[{"type":"node","index":3},0.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c2","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["y"],"type":"inv"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},0.5],"type":"-"},{"args":["x",{"type":"node","index":3}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c3","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[1.0,"y"],"type":"*"},{"args":[{"type":"node","index":1},{"type":"node","index":2},0.1],"type":"+"},{"args":[4.0,{"type":"node","index":3}],"type":"/"},{"args":[{"type":"node","index":4},1.0],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"x"},{"coefficient":1.0,"variable":"y"}],"type":"ScalarAffineFunction"},"sense":"min"},"version":{"major":1,"minor":7}},"objective":1.5449760741521965,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_006_010.json b/src/Test/MINLPTests/nlp_expr_006_010.json new file mode 100644 index 0000000000..5d36f8b388 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_006_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.7546057578960682,"y":1.1267728846792409},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":2},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"f_1d"},{"args":["y",{"type":"node","index":1}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":2},"type":"ScalarNonlinearFunction","node_list":[{"args":["x","y"],"type":"f_2d"},{"args":[{"type":"node","index":1},2.0],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}}],"objective":{"function":{"constant":0.0,"terms":[{"coefficient":1.0,"variable":"y"},{"coefficient":1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.8813786425753092,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_007_010.json b/src/Test/MINLPTests/nlp_expr_007_010.json new file mode 100644 index 0000000000..8b66a4df2f --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_007_010.json @@ -0,0 +1 @@ +{"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":2},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"exp"},{"args":["y",{"type":"node","index":1}],"type":"-"}]},"set":{"value":0.0,"type":"EqualTo"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"value":0.0,"type":"EqualTo"}}],"objective":{"sense":"feasibility"},"version":{"major":1,"minor":7}},"is_feasible":false} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_008_010.json b/src/Test/MINLPTests/nlp_expr_008_010.json new file mode 100644 index 0000000000..7668740e45 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_008_010.json @@ -0,0 +1 @@ +{"primal":{"x":-0.5931585833724874,"z":0.5406271559505175,"y":0.24404790009739324},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":9},"type":"ScalarNonlinearFunction","node_list":[{"args":[-1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[-1.0,"z"],"type":"*"},{"args":[{"type":"node","index":4},-2.0],"type":"+"},{"args":[{"type":"node","index":5}],"type":"exp"},{"args":[{"type":"node","index":3},{"type":"node","index":6}],"type":"+"},{"args":[{"type":"node","index":7},2.0],"type":"-"},{"args":["y",{"type":"node","index":8}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"constant":0.0,"terms":[{"coefficient":-0.5,"variable":"x"},{"coefficient":1.0,"variable":"y"},{"coefficient":-1.0,"variable":"z"}],"type":"ScalarAffineFunction"},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_2","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":-2.0},{"variable_1":"z","variable_2":"z","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"z","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"z","type":"Variable"},"set":{"type":"LessThan","upper":1.0}}],"objective":{"function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"y","y"],"type":"*"},{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},{"type":"node","index":2}],"type":"+"},{"args":["z",3],"type":"^"},{"args":[{"type":"node","index":3},{"type":"node","index":4}],"type":"+"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":-0.3755859323725218,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_009_010.json b/src/Test/MINLPTests/nlp_expr_009_010.json new file mode 100644 index 0000000000..f96a5662f3 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_009_010.json @@ -0,0 +1 @@ +{"primal":{"x":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"}],"constraints":[],"objective":{"function":{"root":{"type":"node","index":8},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-0.5],"type":"+"},{"args":[{"type":"node","index":2},3],"type":"^"},{"args":[0.75,{"type":"node","index":3}],"type":"+"},{"args":[-1.0,"x","x"],"type":"*"},{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":5},{"type":"node","index":6},0.5],"type":"+"},{"args":[{"type":"node","index":4},{"type":"node","index":7}],"type":"min"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":0.75,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_expr_009_011.json b/src/Test/MINLPTests/nlp_expr_009_011.json new file mode 100644 index 0000000000..60a205b501 --- /dev/null +++ b/src/Test/MINLPTests/nlp_expr_009_011.json @@ -0,0 +1 @@ +{"primal":{"x":0.5},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"}],"constraints":[],"objective":{"function":{"root":{"type":"node","index":8},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-0.5],"type":"+"},{"args":[{"type":"node","index":2},3],"type":"^"},{"args":[0.75,{"type":"node","index":3}],"type":"+"},{"args":[1.0,"x","x"],"type":"*"},{"args":[-1.0,"x"],"type":"*"},{"args":[{"type":"node","index":5},{"type":"node","index":6},1.0],"type":"+"},{"args":[{"type":"node","index":4},{"type":"node","index":7}],"type":"max"}]},"sense":"min"},"version":{"major":1,"minor":7}},"objective":0.75,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_002_010.json b/src/Test/MINLPTests/nlp_mi_expr_002_010.json new file mode 100644 index 0000000000..6841fed56f --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_002_010.json @@ -0,0 +1 @@ +{"primal":{"x":2.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x","primal_start":1.0},{"name":"y","primal_start":-1.12}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"log"},{"args":[{"type":"node","index":1},0.1],"type":"-"},{"args":["y",{"type":"node","index":2}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"name":"c2","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["y"],"type":"cos"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},1.5],"type":"+"},{"args":["x",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.9,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"ZeroOne"}}],"objective":{"sense":"feasibility"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_003_010.json b/src/Test/MINLPTests/nlp_mi_expr_003_010.json new file mode 100644 index 0000000000..2f02dd0bae --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_003_010.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"function":{"root":{"type":"node","index":3},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},0.1],"type":"+"},{"args":[{"type":"node","index":2}],"type":"sqrt"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":1.760681686165901,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_003_011.json b/src/Test/MINLPTests/nlp_mi_expr_003_011.json new file mode 100644 index 0000000000..9519c4931c --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_003_011.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},0.1],"type":"+"},{"args":[{"type":"node","index":2}],"type":"sqrt"},{"args":[{"type":"node","index":3},3.141592653589793],"type":"+"}]},"sense":"max"},"version":{"major":1,"minor":7}},"objective":4.902274339755694,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_003_012.json b/src/Test/MINLPTests/nlp_mi_expr_003_012.json new file mode 100644 index 0000000000..865abc1dbb --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_003_012.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"function":{"name":"x","type":"Variable"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":3.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_003_013.json b/src/Test/MINLPTests/nlp_mi_expr_003_013.json new file mode 100644 index 0000000000..865abc1dbb --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_003_013.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"function":{"name":"x","type":"Variable"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":3.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_003_014.json b/src/Test/MINLPTests/nlp_mi_expr_003_014.json new file mode 100644 index 0000000000..ce4263e415 --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_003_014.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":11.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_003_015.json b/src/Test/MINLPTests/nlp_mi_expr_003_015.json new file mode 100644 index 0000000000..ce4263e415 --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_003_015.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":11.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_003_016.json b/src/Test/MINLPTests/nlp_mi_expr_003_016.json new file mode 100644 index 0000000000..493122d156 --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_003_016.json @@ -0,0 +1 @@ +{"primal":{"x":3.0,"y":2.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":5},"type":"ScalarNonlinearFunction","node_list":[{"args":[1.0,"x"],"type":"*"},{"args":[{"type":"node","index":1},-2.0],"type":"+"},{"args":[{"type":"node","index":2}],"type":"exp"},{"args":[{"type":"node","index":3},1.5],"type":"-"},{"args":["y",{"type":"node","index":4}],"type":"-"}]},"set":{"lower":0.0,"type":"GreaterThan"}},{"name":"c1_1","function":{"root":{"type":"node","index":4},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"sin"},{"args":[{"type":"node","index":1},2.0],"type":"^"},{"args":[{"type":"node","index":2},2.0],"type":"+"},{"args":["y",{"type":"node","index":3}],"type":"-"}]},"set":{"type":"LessThan","upper":0.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"y","type":"Variable"},"set":{"lower":0.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"y","type":"Variable"},"set":{"type":"LessThan","upper":4.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"function":{"constant":3.141592653589793,"terms":[{"coefficient":1.0,"variable":"x"}],"type":"ScalarAffineFunction"},"sense":"max"},"version":{"major":1,"minor":7}},"objective":6.141592653589793,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_004_012.json b/src/Test/MINLPTests/nlp_mi_expr_004_012.json new file mode 100644 index 0000000000..f50061ff6d --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_004_012.json @@ -0,0 +1 @@ +{"primal":{"x":1.0,"z":0.0,"y":0.0},"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"},{"name":"z"}],"constraints":[{"name":"c1","function":{"constant":0.0,"terms":[{"coefficient":-1.2,"variable":"x"},{"coefficient":-1.0,"variable":"y"},{"coefficient":-0.7407407407407407,"variable":"z"}],"type":"ScalarAffineFunction"},"set":{"type":"LessThan","upper":0.0}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":2.0},{"variable_1":"z","variable_2":"z","coefficient":2.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":10.0}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-1.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":1.0}},{"function":{"name":"z","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"sense":"feasibility"},"version":{"major":1,"minor":7}},"objective":0.0,"is_feasible":true} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_007_010.json b/src/Test/MINLPTests/nlp_mi_expr_007_010.json new file mode 100644 index 0000000000..8f5a50f182 --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_007_010.json @@ -0,0 +1 @@ +{"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"root":{"type":"node","index":2},"type":"ScalarNonlinearFunction","node_list":[{"args":["x"],"type":"exp"},{"args":["y",{"type":"node","index":1}],"type":"-"}]},"set":{"value":0.0,"type":"EqualTo"}},{"name":"c1_1","function":{"constant":0.0,"affine_terms":[{"coefficient":1.0,"variable":"x"}],"quadratic_terms":[{"variable_1":"y","variable_2":"y","coefficient":-2.0}],"type":"ScalarQuadraticFunction"},"set":{"value":0.0,"type":"EqualTo"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"Integer"}}],"objective":{"sense":"feasibility"},"version":{"major":1,"minor":7}},"is_feasible":false} \ No newline at end of file diff --git a/src/Test/MINLPTests/nlp_mi_expr_007_020.json b/src/Test/MINLPTests/nlp_mi_expr_007_020.json new file mode 100644 index 0000000000..48d332d3c5 --- /dev/null +++ b/src/Test/MINLPTests/nlp_mi_expr_007_020.json @@ -0,0 +1 @@ +{"model":{"name":"MathOptFormat Model","variables":[{"name":"x"},{"name":"y"}],"constraints":[{"name":"c1","function":{"constant":0.0,"affine_terms":[{"coefficient":-1.0,"variable":"x"},{"coefficient":-16.0,"variable":"y"}],"quadratic_terms":[{"variable_1":"x","variable_2":"x","coefficient":2.0},{"variable_1":"y","variable_2":"y","coefficient":32.0}],"type":"ScalarQuadraticFunction"},"set":{"type":"LessThan","upper":-1.25}},{"function":{"name":"x","type":"Variable"},"set":{"lower":-2.0,"type":"GreaterThan"}},{"function":{"name":"x","type":"Variable"},"set":{"type":"LessThan","upper":3.0}},{"function":{"name":"x","type":"Variable"},"set":{"type":"Integer"}},{"function":{"name":"y","type":"Variable"},"set":{"type":"ZeroOne"}}],"objective":{"sense":"feasibility"},"version":{"major":1,"minor":7}},"is_feasible":false} \ No newline at end of file diff --git a/src/Test/Test.jl b/src/Test/Test.jl index bc79a5c05f..4c2ec7e50b 100644 --- a/src/Test/Test.jl +++ b/src/Test/Test.jl @@ -6,6 +6,7 @@ module Test +import JSON import LinearAlgebra import MathOptInterface as MOI diff --git a/src/Test/test_minlptests.jl b/src/Test/test_minlptests.jl new file mode 100644 index 0000000000..ff1ff9d818 --- /dev/null +++ b/src/Test/test_minlptests.jl @@ -0,0 +1,92 @@ +# Copyright (c) 2017: Miles Lubin and contributors +# Copyright (c) 2017: Google Inc. +# +# Use of this source code is governed by an MIT-style license that can be found +# in the LICENSE.md file or at https://opensource.org/licenses/MIT. + +function _test_minlptests( + filename::String, + model::MOI.ModelLike, + config::Config{T}, +) where {T} + @requires T <: Float64 + @requires _supports(config, MOI.optimize!) + data = JSON.parsefile(filename) + io = IOBuffer() + write(io, JSON.json(data["model"])) + seekstart(io) + mof_model = MOI.FileFormats.MOF.Model(; use_nlp_block = false) + read!(io, mof_model) + index_map = MOI.copy_to(model, mof_model) + MOI.optimize!(model) + if data["is_feasible"] + @test MOI.get(model, MOI.TerminationStatus()) == config.optimal_status + @test ≈(MOI.get(model, MOI.ObjectiveValue()), data["objective"], config) + if get(data, "is_primal_unique", true) + for (name, value) in data["primal"] + mof_x = MOI.get(mof_model, MOI.VariableIndex, name) + @test ≈( + MOI.get(model, MOI.VariablePrimal(), index_map[mof_x]), + value, + config, + ) + end + end + else + status = MOI.get(model, MOI.TerminationStatus()) + @test status == config.infeasible_status + end + return +end + +function _setup_minlptests( + filename::String, + model::MOI.ModelLike, + config::Config{T}, +) where {T} + if !(T <: Float64) + return + end + data = JSON.parsefile(filename) + if data["is_feasible"] + primal = map(data["model"]["variables"]) do v + return data["primal"][v["name"]] + end + MOIU.set_mock_optimize!( + model, + mock -> MOIU.mock_optimize!( + mock, + config.optimal_status, + (MOI.FEASIBLE_POINT, primal), + ), + ) + else + MOIU.set_mock_optimize!( + model, + mock -> MOIU.mock_optimize!(mock, config.infeasible_status), + ) + end + return +end + +for filename in readdir(joinpath(@__DIR__, "MINLPTests")) + full_filename = joinpath(@__DIR__, "MINLPTests", filename) + fn_name = Symbol("test_mi" * replace(filename, ".json" => "")) + if occursin("_mi_", filename) + fn_name = Symbol("$(fn_name)_Integer_") + end + @eval begin + function $fn_name(model::MOI.ModelLike, config::Config) + _test_minlptests($full_filename, model, config) + return + end + function setup_test( + ::typeof($fn_name), + model::MOIU.MockOptimizer, + config::Config, + ) + _setup_minlptests($full_filename, model, config) + return + end + end +end