How to write log(1+Ax)? A are two constant

This

including the “testting” and “troubleshooting” sections should help you get started with Mosek.

Also, make sure you are using CVX 2.2


It should be CVX 2.2

I have tried mosek, but it still show infeasible
do you have other advices?

I showed my code.
do you kwon why it is infeasible.

Can you post the full log output from MOSEK. Or, alternatively, a fully reproducible code, completely preformatted, so that it can be copy-pasted and run without effort. (At the moment it is a bit of work to convert your code into something runnable.)

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: 2.0514922393e+10 nrm: 2e+08 Viol. con: 6e-03 var: 0e+00
Dual. obj: 2.0514922394e+10 nrm: 2e+03 Viol. con: 0e+00 var: 7e-08

Basic solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: 2.0514922393e+10 nrm: 2e+08 Viol. con: 6e-08 var: 0e+00
Dual. obj: 2.0514922393e+10 nrm: 2e+03 Viol. con: 0e+00 var: 6e-14
Optimizer summary
Optimizer - time: 1.09
Interior-point - iterations : 16 time: 0.94
Basis identification - time: 0.08
Primal - iterations : 0 time: 0.01
Dual - iterations : 0 time: 0.02
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): +2.05149e+10

CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

Calling Mosek 9.1.9: 1427 variables, 145 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:32:15)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: MACOSX/64-X86

MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (3) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (4) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (5) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (6) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (7) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (8) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (1407) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (1408) of matrix ‘A’.
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 145
Cones : 6
Scalar variables : 1427
Matrix variables : 0
Integer variables : 0

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

Interior-point solution summary
Problem status : DUAL_INFEASIBLE
Solution status : DUAL_INFEASIBLE_CER
Primal. obj: -7.8460433661e+02 nrm: 3e+11 Viol. con: 0e+00 var: 0e+00 cones: 7e-15
Optimizer summary
Optimizer - time: 0.27
Interior-point - iterations : 0 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

I don’t know it is what you want, if you want more information, please tell me.
Thanks for your help.

You are showing 2 different Mosek outputs. What is the difference between the problems you’re solving?

The first was solved to optimality, but the optimal objective value of 2e10 is indicative of very bad numerical scaling.

In the second, Mosek issues warning about nearly zero elements in the input data. Mosek reports dual infeasibility, but it was provided the dual, so I think that should correspond to primal unbounded, yet CVX reports it as (primal( infeasible. This seems to be the same thing as happened in How to minimize the largest singular value of the matrix , So I don’t know whether this is really infeasible or unbounded. Nevertheless, I suggest you improve scaling (by changing units) so that all input data is within s small number of orders of magnitude of 1, then re-run it and see what Mosek and CvX report.

sorry, i can not understand changing units
i do not know how to change units. can you tell me more details.

A variable has a unit e.g it can be meters/second or km/hour or something else. So you should chose decent units.

PS. It seems you still use CVXQUAD because your last logout has:

CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

截屏2021-12-15 下午3.50.52

cvx_begin
cvx_solver mosek
variables P(K,N)
maximize (delta*(sum(A(k,:).*(log(phi(k,:). P(k,:)+L_int(k,:)) -0.2 (2^(sum(P(k,:))))))))
subject to

% constraint 21

for k = 1:K
delta*(sum( A(k,:).*(log(phi(k,:).*P(k,:)+L_int(k,:))))) >= data(k) ;

end

for k = 1:K
beta* delta*sum( (L_int(k,:)-A(k,:))/SoD(k,:).*P(k,:slight_smile: ) >= energy(k);
end

for k = 1:K
    for n = 1:N

        0 <= P(k,n) <=20;
    end
end

cvx_end

i find if i delete subject delta*(sum( A(k,:).*(log(phi(k,:).*P(k,:)+L_int(k,:))))) >= data(k) ;
cvx can solve it
i show my Original optimization problem,can you help me if code is right?

I suggest you make your complete code available including the data so we can reproduce the issue. If you do then please remove all Chinese letters from code.

This

CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

is not indicative of what method CVX actually used to solve the problem. It is always printed, which is a “bug” in CVX, whether the Successive Approximation method, CVXQUAD, or Mosek native exponential cone is used. In this case, based on the output, Mosek native exponential cone was apparently used. The only way to know for sure whether CVXQUAD was (also) used is to see whether there are any Pade Approximant messages prior to the beginning of the solver output.

Got it Mark. CVX has its quirks.