Why does it always show no solution or failure? What's the problem

H=50;Vmax=20;z=10;T=5;N=20;t=T/N;I=4;t0=t/I;B=40*10^6;Z=10;c=0.5*Z*t;
o2=10^-9;om2=10^-13;
y0=10^-6;
c1=1000;c2=1000;c3=1000;c4=1000;ci=[c1,c2,c3,c4];
cm1=1000;cm2=1000;cm3=1000;cm4=1000;cmi=[cm1,cm2,cm3,cm4];
I1=45*10^6;I2=48*10^6;I3=50*10^6;I4=52*10^6;Ii=[I1,I2,I3,I4];
Im1=45*10^6;Im2=48*10^6;Im3=50*10^6;Im4=52*10^6;Imi=[Im1,Im2,Im3,Im4];
ku=10^-28;ki=10^-28;kmi=10^-28;
s1=[5;5];s2=[5;-5];s3=[-5;-5];s4=[-5;5];si=[s1,s2,s3,s4];
sm1=[20;20];sm2=[20;-20];sm3=[-20;-20];sm4=[-20;20];smi=[sm1,sm2,sm3,sm4];
u0=[[-10;0],[-8;0],[-6;0],[-4;0],[-2;0],[0;0],[2;0],[4;0],[6;0],[8;0],[6;0],[4;0],[2;0],[0;0],[-2;0],[-4;0],[-6;0],[-8;0],[-10;0],[-10;0]];
q0=[-10;0];qF=q0;
hm1=(10^-2)*y0*(norm(si(:,1)-smi(:,1)))^-4;hm2=(10^-2)*y0*(norm(si(:,2)-smi(:,2)))^-4;hm3=(10^-2)*y0*(norm(si(:,3)-smi(:,3)))^-4;hm4=(10^-2)*y0*(norm(si(:,4)-smi(:,4)))^-4;
hmi=[hm1,hm2,hm3,hm4];hmi=repmat(hmi,N,1);
  cvx_begin 
      cvx_solver sedumi
      cvx_precision best
      variables fi(N,I) fmi(N,I) fiu(N,I) fmiu(N,I);
      variables lmilo(N,I) lioff(N,I) lilo(N,I);
      expression pmilo(N,I);
      expression pioff(N,I);
      expression pilo(N,I);
      expression hi(N,I);
      expression sum21(N,I);
      expression sum22(N,I);
      expression sum31(N,I);
      expression sum32(N,I);
      expression sum4_i(I);
      expression sum4_uav(I);
      expression sum5_i(I);
      expression sum5_uav(I);
      expression sum6(I);
      expression sum7(I);
      for i=1:I
          for n=1:N
              pmilo(n,i)=om2*(2^(lmilo(n,i)/(B*t0))-1)/hmi(n,i);
          end
      end
      for i=1:I
          for n=1:N
              hi(n,i)=y0/(H^2+(norm(u0(:,n)-si(:,i)))^2);
              pioff(n,i)=o2*(2^(lioff(n,i)/(B*t0))-1)/hi(n,i);
          end
      end
      for i=1:I
          for n=1:N
              
              hi(n,i)=y0/(H^2+(norm(u0(:,n)-si(:,i)))^2);
              pilo(n,i)=o2*(2^(lilo(n,i)/(B*t0))-1)/hi(n,i);
          end
      end
  minimize(sum(sum(t*ki*pow_p(fi,3)))+sum(sum(t*kmi*pow_p(fmi,3)))+sum(sum(t*ku*pow_p(fiu,3)))+sum(sum(t*ku*pow_p(fmiu,3)))+...
        +sum(sum(t0*pmilo))+sum(sum(t0*pioff))+sum(sum(t0*pilo)))
  subject to:
      sum21(1,1)=0;sum21(1,2)=0;sum21(1,3)=0;sum21(1,4)=0;sum22(1,1)=0;sum22(1,2)=0;sum22(1,3)=0;sum22(1,4)=0;
      sum31(1,1)=0;sum31(1,2)=0;sum31(1,3)=0;sum31(1,4)=0;sum32(1,1)=0;sum32(1,2)=0;sum32(1,3)=0;sum32(1,4)=0;
     
      for i=1:I
          for n=1:N
              lmilo(n,i)<=lioff(n,i);
          end
      end
     
      for i=1:I
          for k=2:N
              sum21(k,i)=0;sum22(k,i)=0;
              for n=2:k
                  sum21(k,i)=sum21(k,i)+lilo(n,i);
                  E2=t*fiu(n,i)/ci(i);
                  sum22(k,i)=sum22(k,i)+E2;
              end
              sum21(k,i)+lilo(1,i)-lilo(k,i)>=sum22(k,i);
          end
      end
     
      for i=1:I
          for k=2:N
              sum31(k,i)=0;sum32(k,i)=0;
              for n=2:k
                  sum31(k,i)=sum31(k,i)+lioff(n,i);
                  E3=t*fmiu(n,i)/cmi(i);
                  sum32(k,i)=sum32(k,i)+E3;
              end
              sum31(k,i)+lioff(1,i)-lioff(k,i)>=sum32(k,i);
          end
      end
   
      for i=1:I
          sum4_i(i)=0;sum4_uav(i)=0;
          for n=1:N
              sum4_i(i)=sum4_i(i)+lilo(n,i);
              sum4_uav(i)=sum4_uav(i)+t*fiu(n,i)/ci(i);
          end
           sum4_i(i)==sum4_uav(i);
      end 
     
      for i=1:I
          sum5_i(i)=0;sum5_uav(i)=0;
          for n=1:N
              sum5_i(i)=sum5_i(i)+lioff(n,i);
              sum5_uav(i)=sum5_uav(i)+t*fmiu(n,i)/cmi(i);
          end
           sum5_i(i)==sum5_uav(i);
      end
      
      for i=1:I
          sum6(i)=0;
          for n=1:N
              L6=t*fmi(n,i)/cmi(i)+lmilo(n,i);
              sum6(i)=sum6(i)+L6;
          end
          sum6(i)==Imi(i);
      end
       
      for i=1:I
          sum7(i)=0;
          for n=1:N
              L7=t*fi(n,i)/ci(i)+lilo(n,i);
              sum7(i)=sum7(i)+L7;
          end
          sum7(i)==Ii(i);
      end 
      
      for i=1:I
          lmilo(N,i)==0,lioff(N,i)==0,lilo(N,i)==0,fiu(1,i)==0;fmiu(1,i)==0;
      end
     
      0<=fi;0<=fmi;0<=fiu;0<=fmiu;0<=lmilo;0<=lioff;0<=lilo;  
    cvx_end

The result of running under different solvers is
sedumi:

                   For improved efficiency, SeDuMi is solving the dual problem.
                   SeDuMi will be called several times to refine the solution.
                   Original size: 3448 variables, 1420 equality constraints
                   240 exponentials add 1920 variables, 1200 equality constraints
                -----------------------------------------------------------------
                 Cones  |             Errors              |
            Mov/Act | Centering  Exp cone   Poly cone | Status
            --------+---------------------------------+---------
              0/  0 | 0.000e+00  0.000e+00  0.000e+00 | Unbounded
              0/  0 | 0.000e+00  0.000e+00  0.000e+00 | Unbounded
              0/  0 | 0.000e+00  0.000e+00  0.000e+00 | Unbounded
            -----------------------------------------------------------------
            Status: Infeasible
            Optimal value (cvx_optval): +Inf

sdpt3:

   For improved efficiency, SDPT3 is solving the dual problem.
   SDPT3 will be called several times to refine the solution.
   Original size: 3448 variables, 1420 equality constraints
   240 exponentials add 1920 variables, 1200 equality constraints
-----------------------------------------------------------------
 Cones  |             Errors              |
Mov/Act | Centering  Exp cone   Poly cone | Status
--------+---------------------------------+---------
  0/240 | 3.500e+00  9.107e-12  9.106e-12 | Failed
  0/240 | 1.750e+00  9.107e-12  0.000e+00 | Failed
  0/240 | 8.750e-01  9.106e-12  0.000e+00 | Failed
-----------------------------------------------------------------
Status: Failed
Optimal value (cvx_optval): NaN

mosek:

    MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
    Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
    Platform: Windows/64-X86

    Problem
      Name                   :                 
      Objective sense        : min             
      Type                   : CONIC (conic optimization problem)
      Constraints            : 1420            
      Cones                  : 880             
      Scalar variables       : 3448            
      Matrix variables       : 0               
      Integer variables      : 0               

    Optimizer started.
    Presolve started.
    Linear dependency checker started.
    Linear dependency checker terminated.
    Eliminator started.
    Freed constraints in eliminator : 312
    Eliminator terminated.
    Eliminator started.
    Freed constraints in eliminator : 0
    Eliminator terminated.
    Eliminator - tries                  : 2                 time                   : 0.00            
    Lin. dep.  - tries                  : 1                 time                   : 0.00            
    Lin. dep.  - number                 : 0               
    Presolve terminated. Time: 0.02    
    Problem
      Name                   :                 
      Objective sense        : min             
      Type                   : CONIC (conic optimization problem)
      Constraints            : 1420            
      Cones                  : 880             
      Scalar variables       : 3448            
      Matrix variables       : 0               
      Integer variables      : 0               

    Optimizer  - threads                : 16              
    Optimizer  - solved problem         : the dual        
    Optimizer  - Constraints            : 1096
    Optimizer  - Cones                  : 872
    Optimizer  - Scalar variables       : 3072              conic                  : 2616            
    Optimizer  - Semi-definite variables: 0                 scalarized             : 0               
    Factor     - setup time             : 0.01              dense det. time        : 0.00            
    Factor     - ML order time          : 0.00              GP order time          : 0.00            
    Factor     - nonzeros before factor : 9560              after factor           : 1.03e+04        
    Factor     - dense dim.             : 0                 flops                  : 2.99e+05        
    ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
    0   1.2e+00  5.2e+07  5.5e+02  0.00e+00   5.052244804e+02   -4.645145178e+01  1.0e+00  0.05  
    1   3.5e-01  1.6e+07  3.0e+02  -1.00e+00  4.189844956e+02   -1.303625096e+02  3.0e-01  0.13  
    2   9.7e-02  4.3e+06  1.6e+02  -1.00e+00  1.096225810e+02   -4.310461421e+02  8.3e-02  0.13  
    3   1.8e-02  7.9e+05  6.8e+01  -1.00e+00  -1.775086595e+03  -2.261889257e+03  1.5e-02  0.13  
    Optimizer terminated. Time: 0.14    


    Interior-point solution summary
      Problem status  : DUAL_INFEASIBLE
      Solution status : DUAL_INFEASIBLE_CER
      Primal.  obj: -2.6946830750e+01   nrm: 5e+02    Viol.  con: 2e-13    var: 0e+00    cones: 9e-03  
    Optimizer summary
      Optimizer                 -                        time: 0.14    
        Interior-point          - iterations : 3         time: 0.13    
          Basis identification  -                        time: 0.00    
            Primal              - iterations : 0         time: 0.00    
            Dual                - iterations : 0         time: 0.00    
            Clean primal        - iterations : 0         time: 0.00    
            Clean dual          - iterations : 0         time: 0.00    
        Simplex                 -                        time: 0.00    
          Primal simplex        - iterations : 0         time: 0.00    
          Dual simplex          - iterations : 0         time: 0.00    
        Mixed integer           - relaxations: 0         time: 0.00    

    ------------------------------------------------------------
    Status: Infeasible
    Optimal value (cvx_optval): +Inf

If I remove the target, there are two solvers that work

1 Like

I removed cvx_precision best`, which is not a good thing to use, and solved it using Mosek, which is the most reliable way of solving this in CVX. It reported infeasible. I then removed the objective, and solved it as a feasibility problem, and a claimed solution was found.

Your program has some crazy looking (very small input value) numbers in it, which are perhaps causing numerical issues and unreliability, but I don’t know how many of them make it through to the problem submitted to the solver. I advise you to try to change units to keep non-zero numbers much closer to 1 in magnitude.

Perhaps bad scaling is causing the objective function to couple into the constraints in presolve, or something (well, the objective function probably gets made into a constraint when provided to Mosek), thereby, due to the horrible numerics, resulting in the inconsistent feasibility results between the versions with and without objective.

Here is the output with objective function:

Calling Mosek 9.3.1: 3448 variables, 1420 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.3.1 (Build date: 2021-8-5 17:05:45)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 1420
Cones : 880
Scalar variables : 3448
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 312
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.00
Lin. dep. - number : 0
Presolve terminated. Time: 0.08
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 1420
Cones : 880
Scalar variables : 3448
Matrix variables : 0
Integer variables : 0

Optimizer - threads : 8
Optimizer - solved problem : the dual
Optimizer - Constraints : 1096
Optimizer - Cones : 872
Optimizer - Scalar variables : 3072 conic : 2616
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.02 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 9560 after factor : 1.03e+04
Factor - dense dim. : 0 flops : 2.99e+05
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.2e+00 5.2e+07 5.5e+02 0.00e+00 5.052244804e+02 -4.645145178e+01 1.0e+00 0.13
1 3.5e-01 1.6e+07 3.0e+02 -1.00e+00 4.189844830e+02 -1.303625097e+02 3.0e-01 0.28
2 9.7e-02 4.3e+06 1.6e+02 -1.00e+00 1.096226369e+02 -4.310461420e+02 8.3e-02 0.30
3 1.8e-02 7.9e+05 6.8e+01 -1.00e+00 -1.775089070e+03 -2.261890927e+03 1.5e-02 0.30
4 3.2e-03 1.4e+05 2.9e+01 -1.00e+00 -1.233969745e+04 -1.252853997e+04 2.7e-03 0.31
5 7.1e-04 3.2e+04 1.4e+01 -1.00e+00 -5.838164446e+04 -5.730352239e+04 6.1e-04 0.33
6 1.5e-04 6.9e+03 6.4e+00 -1.00e+00 -2.686607013e+05 -2.616605137e+05 1.3e-04 0.33
7 3.3e-05 1.5e+03 2.9e+00 -1.00e+00 -1.244190837e+06 -1.209278903e+06 2.8e-05 0.34
8 6.9e-06 3.1e+02 1.3e+00 -1.00e+00 -5.854553125e+06 -5.686022228e+06 5.9e-06 0.34
9 1.4e-06 6.3e+01 6.1e-01 -1.00e+00 -2.809283065e+07 -2.727218519e+07 1.2e-06 0.36
10 2.9e-07 1.3e+01 2.8e-01 -1.00e+00 -1.358964296e+08 -1.318799695e+08 2.5e-07 0.36
Optimizer terminated. Time: 0.47

Interior-point solution summary
Problem status : DUAL_INFEASIBLE
Solution status : DUAL_INFEASIBLE_CER
Primal. obj: -3.3830226541e+01 nrm: 2e+01 Viol. con: 6e-15 var: 0e+00 cones: 2e-07
Optimizer summary
Optimizer - time: 0.47
Interior-point - iterations : 10 time: 0.37
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00


Status: Infeasible
Optimal value (cvx_optval): +Inf

Here is the output without objective function:

Calling Mosek 9.3.1: 1032 variables, 268 equality constraints

MOSEK Version 9.3.1 (Build date: 2021-8-5 17:05:45)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : LO (linear optimization problem)
Constraints : 268
Cones : 0
Scalar variables : 1032
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 80
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.02
Lin. dep. - number : 0
Presolve terminated. Time: 0.06
Optimizer terminated. Time: 0.20

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: 0.0000000000e+00 nrm: 2e+11 Viol. con: 0e+00 var: 0e+00
Dual. obj: 0.0000000000e+00 nrm: 0e+00 Viol. con: 0e+00 var: 0e+00

Basic solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: 0.0000000000e+00 nrm: 2e+11 Viol. con: 0e+00 var: 0e+00
Dual. obj: 0.0000000000e+00 nrm: 0e+00 Viol. con: 0e+00 var: 0e+00
Optimizer summary
Optimizer - time: 0.20
Interior-point - iterations : 0 time: 0.09
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00


Status: Solved
Optimal value (cvx_optval): +0

Perhaps a Mosek employee can better diagnose the situation.

1 Like

Also see CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions

1 Like

Thank you for your kind help. I’ll try again

1 Like

Although my problem seems to be solved when the target is removed, it does not satisfy my constraint (6) and (7). Both (6) and (7) are equal to a number after summation of the combination of variables. Although the solution is shown, it does not satisfy the constraint in fact. Because the solution to the variable is basically zero, which is against my original intention. Is this a problem with my code for these two constraints? Or something else

1 Like

I have no idea what your model is supposed to represent. But the input numbers are very bad, which can cause all sorts of havoc and unreliability in the solution process.

1 Like

Hi Dahu/Mark_L-Stone
I manage to run your program with simple bit of tweaking and manage to resolve over your problem
with clear solution from SeDuMi and SDPT3.

Here are the four results based cvx_precision best & without for each of the solvers
SDPT3 will be called several times to refine the solution.
Original size: 3432 variables, 2012 equality constraints
240 exponentials add 1920 variables, 1200 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Solved

Status: Solved
Optimal value (cvx_optval): +7.62432e-08


-----SEDUMI SOLVER--------------------------------------------
Successive approximation method to be employed.
sedumi will be called several times to refine the solution.
Original size: 3432 variables, 2012 equality constraints
240 exponentials add 1920 variables, 1200 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
0/216 | 1.219e-08 2.195e-12 2.195e-12 | Solved
0/233 | 5.513e-07 1.160e-09 1.160e-09 | Solved
0/218 | 8.752e-08 1.597e-12 1.598e-12 | Solved

Status: Solved
Optimal value (cvx_optval): +2.20457e-11
(Note : using cvx-precision best)


Successive approximation method to be employed.
sedumi will be called several times to refine the solution.
Original size: 3432 variables, 2012 equality constraints
240 exponentials add 1920 variables, 1200 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
0/240 | 1.758e-06 4.930e-09 4.930e-09 | Solved

Status: Solved
Optimal value (cvx_optval): +7.73998e-08

PS…Note Mark L Stone . How did SeDuMi nor SDPT3 Solver invoke the Successive Approximation Method
I did not run on MOSEK as I currently see no need to install this’
I did not remove the targets but manage to get the solution
Dahu … In one of your earlier comment you had make reference to a paper. Can you share the paper for better clarity and understanding over optimization problem showing/highliting your objective function/cost function and constraints

Here’s the updated corrected program with notes for your understanding:

H=50;Vmax=20;z=10;T=5;N=20;t=T/N;I=4;t0=t/I;B=4010^6;Z=10;c=0.5Zt;
o2=10^-9;om2=10^-13;
y0=10^-6;
c1=1000;c2=1000;c3=1000;c4=1000;
ci=[c1,c2,c3,c4];
cm1=1000;cm2=1000;cm3=1000;cm4=1000;
cmi=[cm1,cm2,cm3,cm4];
I1=45
10^6;I2=4810^6;I3=5010^6;I4=5210^6;
Ii=[I1,I2,I3,I4];
Im1=45
10^6;Im2=4810^6;Im3=5010^6;Im4=5210^6;
Imi=[Im1,Im2,Im3,Im4];
ku=10^-28;ki=10^-28;kmi=10^-28;
s1=[5;5];s2=[5;-5];s3=[-5;-5];s4=[-5;5];
si=[s1,s2,s3,s4];
sm1=[20;20];sm2=[20;-20];sm3=[-20;-20];sm4=[-20;20];
smi=[sm1,sm2,sm3,sm4];
u0=[[-10;0],[-8;0],[-6;0],[-4;0],[-2;0],[0;0],[2;0],[4;0],[6;0],[8;0],[6;0],[4;0],[2;0],[0;0],[-2;0],[-4;0],[-6;0],[-8;0],[-10;0],[-10;0]];
q0=[-10;0];qF=q0;
hm1=(10^-2)y0(norm(si(:,1)-smi(:,1)))^-4;
hm2=(10^-2)y0(norm(si(:,2)-smi(:,2)))^-4;
hm3=(10^-2)y0(norm(si(:,3)-smi(:,3)))^-4;
hm4=(10^-2)y0(norm(si(:,4)-smi(:,4)))^-4;
hmi=[hm1,hm2,hm3,hm4];
hmi=repmat(hmi,N,1);
cvx_begin
cvx_solver sedumi
%cvx_solver SDPT3
%cvx_precision best
variables fi(N,I) fmi(N,I) fiu(N,I) fmiu(N,I);
variables lmilo(N,I) lioff(N,I) lilo(N,I);
expression pmilo(N,I);
expression pioff(N,I);
expression pilo(N,I);
expression hi(N,I);
expression sum21(N,I);
expression sum22(N,I);
expression sum31(N,I);
expression sum32(N,I);
expression sum4_i(I);
expression sum4_uav(I);
expression sum5_i(I);
expression sum5_uav(I);
expression sum6(I);
expression sum7(I);
for i=1:I
for n=1:N
pmilo(n,i)=om2
(2^(lmilo(n,i)/(Bt0))-1)/hmi(n,i);
end
end
for i=1:I
for n=1:N
hi(n,i)=y0/(H^2+(norm(u0(:,n)-si(:,i)))^2);
pioff(n,i)=o2
(2^(lioff(n,i)/(B*t0))-1)/hi(n,i);
end
end
for i=1:I
for n=1:N

          hi(n,i)=y0/(H^2+(norm(u0(:,n)-si(:,i)))^2);
          pilo(n,i)=o2*(2^(lilo(n,i)/(B*t0))-1)/hi(n,i);
      end
  end

minimize(sum(sum(tkipow_p(fi,3)))+sum(sum(tkmipow_p(fmi,3)))+sum(sum(tkupow_p(fiu,3)))+sum(sum(tkupow_p(fmiu,3)))+…
+sum(sum(t0pmilo))+sum(sum(t0pioff))+sum(sum(t0*pilo)))

subject to

  sum21(1,1)=0;
  sum21(1,2)=0;
  sum21(1,3)=0;
  sum21(1,4)=0;
  sum22(1,1)=0;
  sum22(1,2)=0;
  sum22(1,3)=0;
  sum22(1,4)=0;
  sum31(1,1)=0;
  sum31(1,2)=0;
  sum31(1,3)=0;
  sum31(1,4)=0;
  sum32(1,1)=0;
  sum32(1,2)=0;
  sum32(1,3)=0;
  sum32(1,4)=0;
 
  for i=1:I
      for n=1:N
          lmilo(n,i)<=lioff(n,i);
      end
  end
 
  for i=1:I
      for k=2:N
          sum21(k,i)=0;sum22(k,i)=0;
          for n=2:k
              sum21(k,i)=sum21(k,i)+lilo(n,i);
              E2=t*fiu(n,i)/ci(i);
              sum22(k,i)=sum22(k,i)+E2;
          end
          sum21(k,i)+lilo(1,i)-lilo(k,i)>=sum22(k,i);
      end
  end
 
  for i=1:I
      for k=2:N
          sum31(k,i)=0;sum32(k,i)=0;
          for n=2:k
              sum31(k,i)=sum31(k,i)+lioff(n,i);
              E3=t*fmiu(n,i)/cmi(i);
              sum32(k,i)=sum32(k,i)+E3;
          end
          sum31(k,i)+lioff(1,i)-lioff(k,i)>=sum32(k,i);
      end
  end

  for i=1:I
      sum4_i(i)=0;sum4_uav(i)=0;
      for n=1:N
          sum4_i(i)=sum4_i(i)+lilo(n,i);
          sum4_uav(i)=sum4_uav(i)+t*fiu(n,i)/ci(i);
      end
       sum4_i(i)=sum4_uav(i);%%%%%%%used '=' rather than '==' equality 
  end 
 
  for i=1:I
      sum5_i(i)=0;
      sum5_uav(i)=0;
      for n=1:N
          sum5_i(i)=sum5_i(i)+lioff(n,i);
          sum5_uav(i)=sum5_uav(i)+t*fmiu(n,i)/cmi(i);
      end
       sum5_i(i)=sum5_uav(i);%%%%%%%used '=' rather than '==' equality 
  end
  
  for i=1:I
      sum6(i)=0;
      for n=1:N
          L6=t*fmi(n,i)/cmi(i)+lmilo(n,i);
          sum6(i)=sum6(i)+L6;
      end
      sum6(i)=Imi(i);%%%%%%%used '=' rather than '==' equality 
  end
   
  for i=1:I
      sum7(i)=0;
      for n=1:N
          L7=t*fi(n,i)/ci(i)+lilo(n,i);
          sum7(i)=sum7(i)+L7;
      end
      sum7(i)=Ii(i);%%%%%%%used '=' rather than '==' equality 
  end 
  
  for i=1:I
      %'==' was not used but was corrected with 'equality constrained'
      %to allow cvx to proceed. Please see code on cvx_end.m for
      %understanding at line 60
      lmilo(N,i)==0;%The following cvx variable(s) have been overwritten:\n  %s\nThis is often an indication that an equality constraint was\nwritten with one equals ''='' instead of two ''==''. The model\nmust be rewritten before cvx can proceed.', temp )
      lioff(N,i)==0;%The following cvx variable(s) have been overwritten:\n  %s\nThis is often an indication that an equality constraint was\nwritten with one equals ''='' instead of two ''==''. The model\nmust be rewritten before cvx can proceed.', temp )
      lilo(N,i)==0;%The following cvx variable(s) have been overwritten:\n  %s\nThis is often an indication that an equality constraint was\nwritten with one equals ''='' instead of two ''==''. The model\nmust be rewritten before cvx can proceed.', temp )
      fiu(1,i)==0;%The following cvx variable(s) have been overwritten:\n  %s\nThis is often an indication that an equality constraint was\nwritten with one equals ''='' instead of two ''==''. The model\nmust be rewritten before cvx can proceed.', temp )
      fmiu(1,i)==0;%The following cvx variable(s) have been overwritten:\n  %s\nThis is often an indication that an equality constraint was\nwritten with one equals ''='' instead of two ''==''. The model\nmust be rewritten before cvx can proceed.', temp )
  end
 
  0<=fi;
  0<=fmi;
  0<=fiu;
  0<=fmiu;
  0<=lmilo;
  0<=lioff;
  0<=lilo;  
cvx_end

Hi Mark,
Can you care to comment on the results of both SeDUMI and SDPT 3 solver on their optimal solution .Remarkably , cvx_precision best gives a superior result… question is under what circumstances/scenarios do we invoke this.

my 2nd question is… what is indeed Successive approximation method and how is it being adopted for
both SeDUMi and SDPT 3 Solvers

Lastly, What’s the understanding on the following terminalogies
(1) Cones/Errors/Mov/Act /Centering Exp Cone/Poly Cone

Supra

Read

and

As for assessing the output, I will defer so that Mosek personnel can comment on the Mosek results.

1 Like

Hi Mark
Thanks for your notes on Advanced Topic and hope to hear The Mosek personnel review on my results
for both SeDuMi & SDPT3 Solvers

Supra

If I try a simple objective like

minimize(sum(sum(lmilo))+sum(sum(lioff))+sum(sum(lilo))+sum(sum(fi))+sum(sum(fmi))+sum(sum(fiu))+sum(sum(fmiu)))

or zero objective like @Mark_L_Stone then the solutions always tend to be huge:

Interior-point solution summary
  Problem status  : PRIMAL_AND_DUAL_FEASIBLE
  Solution status : OPTIMAL
  Primal.  obj: 1.5600000000e+12    nrm: 2e+11    Viol.  con: 0e+00    var: 0e+00  
  Dual.    obj: 1.5600000000e+12    nrm: 4e+03    Viol.  con: 0e+00    var: 0e+00 

That suggests to me that perhaps the whole feasible set lies very far out. Now if you have a simple objective then it is lucky enough the solution is found in presolve where it just uses fairly simple arithmetic. When you set a more complicated objective the interior-point optimizer cannot handle it numerically, and you get the infeasible status. Which is morally correct: if the solutions to your problem start as far as 2e+11 then you can just as well say there are no solutions. That’s the best explanation I can offer at the moment.

1 Like

Hi Michal

You raised a valid point on huge data values
such as B=4010^6, I1=4510^6;I2=4810^6;I3=5010^6;I4=5210^6;
and Im1=45
10^6;Im2=4810^6;Im3=5010^6;Im4=52*10^6; which
I doubted earlier.

Unfortunately I’m not the originator of the program which was done by Dahu
and had requested for his reference paper on his basis. To-date Dahu has yet
to response

Indeed Mark and I quote “I have no idea what your model is supposed to represent. But the input numbers are very bad, which can cause all sorts of havoc and unreliability in the solution process.”
But Dahu did not response at all.

I merely tweak the program and included the updated program to get a ‘solvable’ solutions
for both SeDuMI & SDPT3 solvers which only Mark had responded.

Nonetheless I thank you for your valuable insights and await for Dahu on his response

Supra