MINLPLib

A Library of Mixed-Integer and Continuous Nonlinear Programming Instances

Home // Instances // Documentation // Download // Statistics


Instance inscribedsquare01

The inscribed square problem, also known as the square peg problem or the Toeplitz' conjecture, is an unsolved question in geometry: Does every plane simple closed curve contain all four vertices of some square?
This is true if the curve is convex or piecewise smooth and in other special cases.
The problem was proposed by Otto Toeplitz in 1911. See also https://en.wikipedia.org/wiki/Inscribed_square_problem
This instance computes a maximal inscribing square for the curve (sin(t)*cos(t), sin(t)*t), t in [-pi,pi].
Formats ams gms mod nl osil py
Primal Bounds (infeas ≤ 1e-08)
0.99007474 p1 ( gdx sol )
(infeas: 2e-13)
Other points (infeas > 1e-08)  
Dual Bounds
0.99008465 (COUENNE)
0.99007474 (LINDO)
0.99007638 (SCIP)
References Toeplitz, Otto, Über einige Aufgaben der Analysis situs, Verhandlungen der Schweizerischen Naturforschenden Gesellschaft, 94, 1911, 197.
Source Benjamin Müller and Felipe Serrano
Application Geometry
Added to library 25 Sep 2019
Problem type NLP
#Variables 8
#Binary Variables 0
#Integer Variables 0
#Nonlinear Variables 6
#Nonlinear Binary Variables 0
#Nonlinear Integer Variables 0
Objective Sense max
Objective type quadratic
Objective curvature convex
#Nonzeros in Objective 2
#Nonlinear Nonzeros in Objective 2
#Constraints 8
#Linear Constraints 0
#Quadratic Constraints 0
#Polynomial Constraints 0
#Signomial Constraints 0
#General Nonlinear Constraints 8
Operands in Gen. Nonlin. Functions cos mul sin
Constraints curvature indefinite
#Nonzeros in Jacobian 24
#Nonlinear Nonzeros in Jacobian 8
#Nonzeros in (Upper-Left) Hessian of Lagrangian 6
#Nonzeros in Diagonal of Hessian of Lagrangian 6
#Blocks in Hessian of Lagrangian 6
Minimal blocksize in Hessian of Lagrangian 1
Maximal blocksize in Hessian of Lagrangian 1
Average blocksize in Hessian of Lagrangian 1.0
#Semicontinuities 0
#Nonlinear Semicontinuities 0
#SOS type 1 0
#SOS type 2 0
Minimal coefficient 1.0000e+00
Maximal coefficient 1.0000e+00
Infeasibility of initial point 1
Sparsity Jacobian Sparsity of Objective Gradient and Jacobian
Sparsity Hessian of Lagrangian Sparsity of Hessian of Lagrangian

$offlisting
*  
*  Equation counts
*      Total        E        G        L        N        X        C        B
*          9        9        0        0        0        0        0        0
*  
*  Variable counts
*                   x        b        i      s1s      s2s       sc       si
*      Total     cont   binary  integer     sos1     sos2    scont     sint
*          9        9        0        0        0        0        0        0
*  FX      0
*  
*  Nonzero counts
*      Total    const       NL      DLL
*         27       17       10        0
*
*  Solve m using DNLP maximizing objvar;


Variables  objvar,x2,x3,x4,x5,x6,x7,x8,x9;

Positive Variables  x8,x9;

Equations  e1,e2,e3,e4,e5,e6,e7,e8,e9;


e1.. -(sqr(x8) + sqr(x9)) + objvar =E= 0;

e2.. sin(x2)*cos(x2) - x6 =E= 0;

e3.. sin(x2)*x2 - x7 =E= 0;

e4.. sin(x3)*cos(x3) - x6 - x8 =E= 0;

e5.. sin(x3)*x3 - x7 - x9 =E= 0;

e6.. sin(x4)*cos(x4) - x6 + x9 =E= 0;

e7.. sin(x4)*x4 - x7 - x8 =E= 0;

e8.. sin(x5)*cos(x5) - x6 - x8 + x9 =E= 0;

e9.. sin(x5)*x5 - x7 - x8 - x9 =E= 0;

* set non-default bounds
x2.lo = -3.14159265358979; x2.up = 3.14159265358979;
x3.lo = -3.14159265358979; x3.up = 3.14159265358979;
x4.lo = -3.14159265358979; x4.up = 3.14159265358979;
x5.lo = -3.14159265358979; x5.up = 3.14159265358979;

* set non-default levels
x2.l = -3.14159265358979;
x3.l = -1.5707963267949;
x5.l = 1.5707963267949;
x6.l = 1.22464679914735E-16;
x7.l = 3.84734138744358E-16;
x8.l = 1;
x9.l = 1;

Model m / all /;

m.limrow=0; m.limcol=0;
m.tolproj=0.0;

$if NOT '%gams.u1%' == '' $include '%gams.u1%'

$if not set NLP $set NLP NLP
Solve m using %NLP% maximizing objvar;


Last updated: 2024-03-25 Git hash: 1dae024f
Imprint / Privacy Policy / License: CC-BY 4.0