0
$\begingroup$

*answer is $x=(10,5)^T$
(a,b) is inner product.
x and y is 2d vector.

Find $\bar{x}$ within the area by the systems of inequality,$K(x)$ s.t.

About inner product of vector F(x) and (y-x),
$F(\bar{x})^T.(y-\bar{x}) \geq 0$ For Any $y$ in $K(\bar{x})$

$F(x)=a.x-b$
$K(x)=\bar{K}\space and \space \hat{K}$
$\bar{K}=c.y-d\leq 0$
$\hat{K}=e.y+g.x-h\leq 0$

first,setting the matrix and vector

a = {{2, 8/3}, {5/4, 2}};
b = {{34}, {24.25}};
c = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
d = {{0}, {11}, {0}, {11}};
e = {{1, 0}, {0, 1}};
g = {{0, 1}, {1, 0}};
h = {{15}, {15}};


so I want to do like the following)

y = Array[yy, {2}];
x = Array[xx, {2}];
cond1 = # <= 0 & /@ Flatten@(c.y - d);
cond2 = # <= 0 & /@ Flatten@(e.y + g.x - h);
F = Transpose[a.x - b];
target = First@Flatten@(F.(y - x));
SomeFunction[target>=0, And @@ Join[cond1, cond2]]

=>

{xx[1]->10,xx[2]->5}

how to solve the inequality F.(y-x)>=0 using cond1 and cond2?
this returns error:

Solve[{target >= 0, List @@ Join[cond1, cond2]}, Join[x, y]]
$\endgroup$
0

2 Answers 2

4
$\begingroup$

Using your definitions of a, b, c, d, e, g, h, target, cond1, cond2, you can find the minimum value of target (under the constraints) using NMinimize:

NMinimize[{target^2, Join[{cond1, cond2}]}, Flatten[{x, y}]]
{3.29871*10^-22, {xx[1] -> 7.92824, xx[2] -> 6.96093, 
                  yy[1] -> 0.530959, yy[2] -> -0.455972}}

I don't think this is exactly what you are looking for, but it might help to get you started.

$\endgroup$
0
-1
$\begingroup$

Added:
Because this kind of dual problem should be treated as a multi-step decision problem, I use this as the answer to the question.

$L(y,x):=F(x)^T.(y-x)$
$L(y,x)\geq 0 \Rightarrow minL(y,x)\geq0$

Avoiding the case of minL==0, because of constraints.

Table[{s, j, 
     First@Flatten[
       NMinimize[{(target /. {xx[1] -> s, xx[2] -> j}), 
         List @@ Reduce[
           And @@ Join[cond1, cond2] /. {xx[1] -> s, xx[2] -> j}, y]},
         y]]}, {s, 0, 15}, {j, 0, 15}] // Flatten[#, 1] & // 
  Select[#, Last@# > 0 &] & // First@SortBy[#, Last@# &] &

{10, 5, 1.77636*10^-15}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.