Download LINDO API USER MANUAL

Transcript
SOLVING SECOND-ORDER CONE PROGRAMS
321
The source code file for this example may be found in the \LINDOAPI\samples\c\ex_soc1\ folder.
After creating the executable “ex_soc1.exe”, you can run the application from the DOS-prompt and
produce the following report on your screen.
Minimum norm
x[0]
x[1]
x[2]
x[3]
x[4]
x[5]
=
=
=
=
=
=
=
0.05903
0.05903
0.02083
0.03572
-0.01407
0.01738
0.03
Converting Models to SOCP Form
SOCP constraints are more general than perhaps is superficially obvious. As a first illustration of this
generality, consider a constraint set of the form:
r ≥ (a + bx)/(c+dx);
c+dx ≥ 0;
Expressions such as this arise for example in modeling delay as a function of traffic volume through a
congested facility or transportation link. A constraint such as the above can be put into SOCP form if
a – bc/d ≥ 0. To do this define:
2y = c+dx, then x = (2y-c)/d, and r ≥ (a + bx)/(c+dx) = (a + bx)/(2y) = (a – bc/d)/(2y) + b/d.
Thus, the constraint is convex if y ≥ 0 and a – bc/d ≥ 0.
If we define u = (r-b/d), then r - b/d ≥ (a – bc/d)/(2y) is equivalent to the cone constraint:
2yu ≥ a-bc/d.
Summarizing, given a – bc/d ≥ 0, we can replace:
r ≥ (a + bx)/(c+dx);
c+dx ≥ 0;
by the SOCP set of constraints:
2y = c+dx;
r = u + b/d;
2yu ≥ a-bc/d;
y ≥ 0;
The follow code shows how use LINDO API’s conic solver to set up and solve a model with
constraints of the above type, where b = c = 0.