Unbounded, cvx_optval = Inf


(Menna Khaled) #1

My problem has no constraints and there’s no way it’s equal infinity because the denumerator can’t be equal 0 as I divide by:
certainPositiveVal(which can be zero) + Positive nonzero constant

However it’s unbounded, is there a possible reason for this ?


(Mark L. Stone) #2

Please show a complete reproducible program.


(Menna Khaled) #3

close all
numberOfUsers =3;
numberOfResources =3;
numberOfRRHs =3;
side =150;

G(:,:,1) = [1.2937 0.0630 0.6123
19.5208 17.0031 3.8738
3.1724 1.0392 2.8971 ];

G(:,:,2) = [ 0.9842 3.8887 1.2775
7.1651 8.1500 2.9065
31.6739 39.0287 34.5636];

G(:,:,3) =[ 12.5486 4.4018 7.0245
2.3316 10.9949 0.2540
1.4895 0.6239 1.4628];

thirdDimensionOnesTemp = [1 2 2 2 2 2 2 2 3]’;
rowsOnesTemp = [ 1 2 3 1 2 3 1 3 2]’;
coloumnsOnesTemp = [1 1 1 2 2 2 3 3 3]’;
sigma = 0.0024;

maxTotalPower =3;
cvx_begin gp
variable vars(9)

P = cvx(zeros(numberOfUsers,numberOfResources,numberOfRRHs));
for m = 1:9
P(rowsOnesTemp(m),coloumnsOnesTemp(m),thirdDimensionOnesTemp(m))= vars(m);
end

numSIRug = cvx(zeros(numberOfUsers,numberOfResources));
denumSIRug = cvx(zeros(numberOfUsers,numberOfResources));
numSIRu = cvx(zeros(1,numberOfUsers));
denumSIRu = cvx(zeros(1,numberOfUsers));


for u = 1:numberOfUsers
    GsToBeIncludedNum = [];
    for g = 1:numberOfResources 
        transmittingR = thirdDimensionOnesTemp(find(rowsOnesTemp==u & coloumnsOnesTemp == g));
        if ~isempty(transmittingR)
            numSIRug(u,g) = P(u,g,transmittingR)*G(u,g,transmittingR);
            GsToBeIncludedNum = [GsToBeIncludedNum g];
          
        end
    end
    numSIRu(u) = prod(numSIRug(u,GsToBeIncludedNum));
   
end
for g = 1: numberOfResources
urMatrixforThisG = P(:,g,:);
    for u = 1:numberOfUsers
    copy = urMatrixforThisG;
    copy(u,:,:)=[];
    denumSIRug(u,g) = 0; 
        for r = 1:numberOfRRHs
                denumSIRug(u,g) = denumSIRug(u,g) + sum(copy(:,:,r))*G(u,g,r);
             
               
     
        end
    end
end

denumSIRug = denumSIRug + sigma;


for u = 1:numberOfUsers
     GsToBeIncludedDenum = [];
  for g = 1: numberOfResources
       transmittingR = thirdDimensionOnesTemp(find(rowsOnesTemp==u & coloumnsOnesTemp == g));
        if ~isempty(transmittingR)
           GsToBeIncludedDenum = [GsToBeIncludedDenum g];
           
        end
             
  end
  denumSIRu(u) = prod(denumSIRug(u,GsToBeIncludedDenum));
  
end

InvRatePerUser = denumSIRu./numSIRu;

totalInvRate = prod(InvRatePerUser);
miu = 2;
alpha = 2*ones(1,numberOfUsers);
minimize(totalInvRate + miu*(sum(vars)-maxTotalPower)+sum(alpha.*(InvRatePerUser-ones(1,numberOfUsers))))

cvx_end

Gives Unbounded result !


(Mark L. Stone) #4

Using CVX3.0beta, I got

Error using - (line 27)
Disciplined geometric programming error:
Invalid operation: {posynomial} - {3}

from the minimize statement.


(Menna Khaled) #5

which line is that please ?

and can you tell me how can I know my CVX version and update it if necessary ?


(Mark L. Stone) #6

The statement which has minimize .

cvx_version .

http://cvxr.com/cvx/download/ shows the latest version. At this point, CVX 2.1 is more reliable than CVX 3.0beta.


(Menna Khaled) #7

I have CVX 2.1 and it gives me an unbounded solution, any ideas ?


(Mark L. Stone) #8

Using CVX2.1, I got infeasible, or inaccurate/infeasible. Given that you are minimizing, cvx_optval = +Inf is basically a way of saying the problem is infeasible. Given use of CVX’s successive approximation method and the inaccurate/infeasible result from sedumi, I’m not 100% convinced the problem is truly infeasible. I haven’t figured out what your model is, so I have no first principles opinion on it.

If you believe the problem is feasible, can you produce a feasible solution?

Here is the output from sdpt3 and sedumi.

Successive approximation method to be employed.
   For improved efficiency, SDPT3 is solving the dual problem.
   SDPT3 will be called several times to refine the solution.
   Original size: 127 variables, 56 equality constraints
   40 exponentials add 320 variables, 200 equality constraints
-----------------------------------------------------------------
 Cones  |             Errors              |
Mov/Act | Centering  Exp cone   Poly cone | Status
--------+---------------------------------+---------
 13/ 13 | 8.000e+00  2.044e+01  0.000e+00 | Unbounded
  1/  1 | 8.000e+00  6.066e+00  0.000e+00 | Unbounded
 22/ 22 | 7.101e+00  5.622e-01  0.000e+00 | Unbounded
  8/  8 | 8.000e+00  2.910e+00  0.000e+00 | Unbounded
  0/  0 | 0.000e+00  0.000e+00  0.000e+00 | Unbounded
-----------------------------------------------------------------
Status: Infeasible
Optimal value (cvx_optval): +Inf

++++++++++++++++++++++++++++++++++++++++++++++++

Successive approximation method to be employed.
   For improved efficiency, SeDuMi is solving the dual problem.
   SeDuMi will be called several times to refine the solution.
   Original size: 127 variables, 56 equality constraints
   40 exponentials add 320 variables, 200 equality constraints
-----------------------------------------------------------------
 Cones  |             Errors              |
Mov/Act | Centering  Exp cone   Poly cone | Status
--------+---------------------------------+---------
 13/ 13 | 8.000e+00  1.473e+01  0.000e+00 | Unbounded
  2/  2 | 8.000e+00  8.024e+00  0.000e+00 | Unbounded
 19/ 19 | 6.578e+00  2.815e+00  0.000e+00 | Inaccurate/Unbounded
  0/  0 | 0.000e+00  0.000e+00  0.000e+00 | Inaccurate/Unbounded
  0/  0 | 0.000e+00  0.000e+00  0.000e+00 | Inaccurate/Unbounded
  0/  0 | 0.000e+00  0.000e+00  0.000e+00 | Inaccurate/Unbounded
-----------------------------------------------------------------
Status: Inaccurate/Infeasible
Optimal value (cvx_optval): +Inf

(Menna Khaled) #9

I’ll try to figure it out, thanks


(Menna Khaled) #10

what do you mean by infeasible when it has no constraints ?
that’s the part I don’t understand, what can be the cause of infeasibility when there are no constraints to satisfy ?


(Mark L. Stone) #11

There are implicit (not explicitly stated) constraints in geometric programming. As I said, I haven’t figured out what your model is, so I have to defer to someone else for a more detailed assessment.