# How can I eliminate Inaccurate/solved status? I've already set the precision to best

How can I eliminate Inaccurate/solved status? I’ve already set the precision to best.

Setting precision to `best` is certainly not going to help. The problem is that the solvers cannot achieve enough accuracy to return a normal `Solved` status. There’s not much you can do here, really, except perhaps try different solvers.

Perhaps you can improve your model formulation, such as scaling of the variables.

Thanks for your help. You mean scaling of the variables in convex fitting model or in the convex optimization problem? I’ve scaled the variables in the convex optimization.

I don’t understand your distinction. If you provide your complete model, preferably with all input data (i.e., reproducible), more help might be available. Or if that’s not a feasible, a “minimal” reproducible example which exhibits the problematic behavior.

Sir, this is the complete model of my problem. Again, thanks!

``````cvx_begin
variables Tem2(Nd)  Pice_f(Non) Pem1_e(Non) wem1(Non) Eb(Nd+1) wice(Non);%Pbrk(Nd)
expressions  Pem1_m(Non) Pbatt(Nd) Pbloss(Nd) Ub(Nd) Ub2(Nd);

Pbatt = -(Eb(2:Nd+1)-Eb(1:Nd))/dt*Se/Sp;
Ub2=2*Eb(1:Nd)/C*Se/Su2 + V0^2*n0*1/Su2;
Ub = sqrt(n0*Su2)*sqrtprod(Ub2,1)/Su;

minimize(sum(Pice_f))
subject to
%%%%%%%%%%%%%  ICE on
ix=on;
Pbatt(ix) >= Pbloss(ix) + Pem1_e ...
%%%%%%%%%%%%%  ICE off
ix=~on;
%%%%%%%%%%%%%%Constraints
Tem2 >= -5000/St;
Tem2 <= 5000/St;
Eb(1)==Eb(Nd+1);
Pbatt >= bat.Imin*Ub*Su/Sp;
Pbatt <= bat.Imax*Ub*Su/Sp;
Pice_f >= 5000/Sp;
Pice_f <= 330000/Sp;
wem1>=-1;
wem1<=1;
wice>=73.3038/276.9838;
wice<=276.9838/276.9838;
Pem1_e>=-1500*900/9.55/Sp;
Pem1_e<=1500*900/9.55/Sp;

cvx_end``````

You have not provided reproducible code. Some input values are missing. While you’re at it, try to get all your code into the code box.

Since I don’t know the values of the MATLAB variables you haven’t provided, it’s hard for me to say much until you do.

Can you also show the output? Try running with as many solvers as you have (I presume at least sedumi and sdpt3).

could you please give me your email? I can send u the m files

I just sent you a message.

Also, please go ahead and show the ouput from running CVX with all the solvers you have available.

Have you examined the solution? Is there something specific about it that is rendering it unsuitable for use? The `Inaccurate` status should not be interpreted as a sign that it’s hopeless, just that you should check the solution returned carefully. If it works well for the rest of your application, then you should consider specifying a lower precision for the solver; e.g., `cvx_precision medium`.

The Inaccurate/solved status is eliminated when one of the expression is changed by using an alternative simpler mathamatic model. However, the solutions of the two CVX problem are almostly the same.