Referenced a field that does not exist 'sol',error cvx_mosek

delta_t=5;
T=120;
N=T/(delta_t);
K=6;
k1=[-1100,600,0];
k2=[-700,-600,0];
k3=[-400,400,0];
k4=[200,200,0];
k5=[600,1200,0];
k6=[800,-400,0];
w=[k1;k2;k3;k4;k5;k6];
R_1=1e+7ones(N,1);
R_2=2e+7
ones(N,1);
R_3=3e+7ones(N,1);
R_4=1e+7
ones(N,1);
R_5=2e+7ones(N,1);
R_6=3e+7
ones(N,1);
R_req=[R_1,R_2,R_3,R_4,R_5,R_6];
H=100;
Bt=5e+6;
beta=0.001;
p=0.1;
delta= 1.0000e-11;
e=2.7182;
E_init=3.996e+5;
Vmax=50;
zeta=0.012;
v0=4.3;
epsilong=1.0000e-8;
xi=1.0000e-7;
M1=4e+7;
M2=Btlog(1+(pbeta)/(H^2delta));
R_tot=0;
for n=1:1:N
qx1(n,1)=-600+1193.5
(cos((2pi(n-1)delta_t)/(T-delta_t)));
qy1(n,1)=233+1193.5
(sin((2pi(n-1)delta_t)/(T-delta_t)));
end
for n=1:1:N
qz(n,:)=H;
end
qz1=qz;
q1=[qx1,qy1,qz1];
for n=1:1:N
for k=1:1:K
gamma(n,k)=(p
beta)/(((norm(q1(n,:)-w(k,:)))^2)delta);
end
end
for n=1:1:N
for k=1:1:K
RR(n,k)=Bt
log(1+gamma(n,k));
end
end
cvx_begin
cvx_solver mosek
variable a(N,K) binary;
for k=1:1:K
for n=1:1:N
R_tot=R_tot+Bta(n,k)RR(n,k);
end
end
maximize R_tot;
subject to
for k=1:1:K
for n=1:1:N
R_tot=R_tot+Bt
a(n,k)RR(n,k);
end
end
R_tot>=t;
for n=1:1:N
for k=1:1:K
R_req(n,k)-RR(n,k)<=M1
(1-a(n,k))-1;
RR(n,k)-R_req(n,k)<=M2
a(n,k);
end
end
cvx_end
for n=1:1:N
for k=1:1:K
A(n,k)=-pbetadelta^2log(e)/((((norm(q1(n,:)-w(k,:)))^2)delta^2)((((norm(q1(n,:)-w(k,:)))^2)delta^2)+pbeta));
end
end
for n=1:1:N
for k=1:1:K
B(n,k)=Bt
log(1+gamma(n,k));
end
end
for k=1:1:K
for n=1:1:N
R_req1(n,k)=a(n,k)R_req(n,k);
end
end
cvx_begin
cvx_solver mosek
variable Q(N,3)
expression C(N,K)
dual variable yy
for n=1:1:N
for k=1:1:K
C(n,k)=A(n,k)
(pow_pos(norm(Q(n,:)-w(k,:)),2)-pow_pos(norm(q1(n,:)-w(k,:)),2));
end
end
for n=1:1:N
for k=1:1:K
ff(n,k)=a(n,k)(C(n,k)+B(n,k));
end
end
maximize sum(sum(ff))
R_tot1>=t1;
yy: ff>= R_req1;
Q(:,3) >= 50
for n=1:1:N
for k=1:1:K
Q(n,3)<=(p
beta/(((2^(R_req(n,k)/Bt))-1)(delta^2)))+(pow_pos(norm(q1(n,1:2)-w(k,1:2)),2)-2(q1(n,1:2)-w(k,1:2))(Q(n,1:2)-w(k,1:2))’)
end
end
for n=1:1:N-1
norm(Q(n+1,:)-Q(n,:))<=Vmax
delta_t;
end
cvx_end

Are you using CVX 3.0BETA? it has a lot of bugs. if using CVX 3.0BETA, please switch to CVX 2.1.

If using CVX 2.1, please show complete output from running your program and show the output from cvx_version .

dear Mark,I am using cvx 2.1.

Please show us the output from running the program.

Missing sol normally means Mosek did not even attempt to produce any solution because of an error. Perhaps an error in input data such as NaN or something of this kind. Impossible to say for sure without seeing the log.

dear mark, the output from running the program as follow
Calling Mosek 8.0.0.60: 432 variables, 288 equality constraints

MOSEK Version 8.0.0.60 (Build date: 2017-3-1 13:09:33)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

MOSEK warning 57: A large value of -3.7e+013 has been specified in cx for variable ‘’ (0).
MOSEK warning 57: A large value of -3.8e+013 has been specified in cx for variable ‘’ (1).
MOSEK warning 57: A large value of -4.1e+013 has been specified in cx for variable ‘’ (2).
MOSEK warning 57: A large value of -4.5e+013 has been specified in cx for variable ‘’ (3).
MOSEK warning 57: A large value of -5.0e+013 has been specified in cx for variable ‘’ (4).
MOSEK warning 57: A large value of -5.6e+013 has been specified in cx for variable ‘’ (5).
MOSEK warning 57: A large value of -6.3e+013 has been specified in cx for variable ‘’ (6).
MOSEK warning 57: A large value of -7.2e+013 has been specified in cx for variable ‘’ (7).
MOSEK warning 57: A large value of -8.0e+013 has been specified in cx for variable ‘’ (8).
MOSEK warning 57: A large value of -8.5e+013 has been specified in cx for variable ‘’ (9).
Warning number 57 is disabled.
Problem
Name :
Objective sense : min
Type : LO (linear optimization problem)
Constraints : 288
Cones : 0
Scalar variables : 432
Matrix variables : 0
Integer variables : 144

Optimizer started.
Mixed integer optimizer started.
Threads used: 4
Presolve started.
Presolve terminated. Time = 0.00
Presolved problem: 0 variables, 0 constraints, 0 non-zeros
Presolved problem: 0 general integer, 0 binary, 0 continuous
Clique table size: 0
BRANCHES RELAXS ACT_NDS DEPTH BEST_INT_OBJ BEST_RELAX_OBJ REL_GAP(%) TIME
0 1 0 0 -1.7858342304e+015 -1.7858342304e+015 0.00e+000 0.1
An optimal solution satisfying the relative gap tolerance of 1.00e-002(%) has been located.
The relative gap is 0.00e+000(%).
An optimal solution satisfying the absolute gap tolerance of 0.00e+000 has been located.
The absolute gap is 0.00e+000.

Objective of best integer solution : -1.785834230359e+015
Best objective bound : -1.785834230359e+015
Construct solution objective : Not employed
Construct solution # roundings : 0
User objective cut value : 0
Number of cuts generated : 0
Number of branches : 0
Number of relaxations solved : 1
Number of interior point iterations: 0
Number of simplex iterations : 0
Time spend presolving the root : 0.00
Time spend in the heuristic : 0.00
Time spend in the sub optimizers : 0.00
Time spend optimizing the root : 0.00
Mixed integer optimizer terminated. Time: 0.11

Optimizer terminated. Time: 0.19

Integer solution solution summary
Problem status : PRIMAL_FEASIBLE
Solution status : INTEGER_OPTIMAL
Primal. obj: -1.7858342304e+015 nrm: 5e+007 Viol. con: 2e-009 var: 0e+000 itg: 0e+000
Optimizer summary
Optimizer - time: 0.19
Interior-point - iterations : 0 time: 0.00
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: 1 time: 0.11


Status: Solved
Optimal value (cvx_optval): +1.78583e+15

Calling Mosek 8.0.0.60: 1602 variables, 671 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 8.0.0.60 (Build date: 2017-3-1 13:09:33)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Mosek error: MSK_RES_ERR_HUGE_C (A large value of 3.3e+017 has been specified in cx for variable ‘’ (335).)

Status: Error
Optimal value (cvx_optval): NaN

The last error explains it all. The coefficients are so enormous Mosek refuses to work with them. You need to scale the problem better.

yes, thankyou! But i don’t know how to do it.