When I use pow_ This error occurs when the POS function is. What's going on?

A field that does not exist is referenced ‘log-valid’。

出错 cvx_remap>@(x)remap_str.(x) (line 99)
remapper = @(y) any( remap_big( cellfun( @(x)remap_str.(x), y ), : ), 1 );

出错 cvx_remap>@(y)any(remap_big(cellfun(@(x)remap_str.(x),y),:),1) (line 99)
remapper = @(y) any( remap_big( cellfun( @(x)remap_str.(x), y ), : ), 1 );

出错 cvx_remap (line 146)
r = remapper( varargin );

出错 cvx/pow_cvx (line 13)
remap_x2 = cvx_remap( ‘log-valid’ ) & ~remap_x1;

出错 cvx/pow_pos (line 15)
y = pow_cvx( x, p, ‘pow_pos’ );

出错 ceshi2 (line 26)
KFC=pow_pos(Kfc,4);

Where KFC is a function containing a variable PFC

What is the output of cvx_verson

Perhaps there is a bug. or a messed up installation.

Can you show us your complete program? If you insert the “statement”
Kfc`
just prior to the statement producing the error, what is the output?

cvx_version


CVX: Software for Disciplined Convex Programming ©2014 CVX Research
Version 3.0beta, Build 1183 (dda2109) Sun Dec 17 18:58:10 2017

Installation info:
Path: E:\Matlab2014\bin\cvx
MATLAB version: 8.3 (R2014a)
OS: Windows 8 amd64 version 6.2
Java version: 1.7.0_11
Verfying CVX directory contents:
WARNING: The following extra files/directories were found:
E:\Matlab2014\bin\cvx\lib@cvxobj\ + 11 files, 0 subdirectories
E:\Matlab2014\bin\cvx\lib\narginchk_\ + 1 files, 0 subdirectories
E:\Matlab2014\bin\cvx\commands\cvx_pause.m
E:\Matlab2014\bin\cvx\commands\cvx_power_warning.m
E:\Matlab2014\bin\cvx\functions@cvx\avg_abs_dev.m
E:\Matlab2014\bin\cvx\functions@cvx\avg_abs_dev_med.m
E:\Matlab2014\bin\cvx\functions@cvx\berhu.m
E:\Matlab2014\bin\cvx\functions@cvx\cvx_recip.m
E:\Matlab2014\bin\cvx\functions@cvx\det_inv.m
E:\Matlab2014\bin\cvx\functions@cvx\det_rootn.m
E:\Matlab2014\bin\cvx\functions@cvx\geo_mean.m
E:\Matlab2014\bin\cvx\functions@cvx\huber_pos.m
(and 147 more files)
These files may alter the behavior of CVX in unsupported ways.
Loading preferences:
Preferences already loaded:
Local: C:\Users\admin\AppData\Roaming\MathWorks\MATLAB\cvx_prefs.mat
License host:
Username: admin
Host ID: 18c04d19f039 (eth2,172.16.202.82,2001:250:4801:1823:258a:b789:c162:a363,2001:250:4801:1823:5df3:e771:80bf:7d47)
Installed license:
No license installed.
No valid licenses found.
Click here to fill out an academic license request
for the username and first hostid listed above.

This is my complete program. Please see how to solve the error?

cvx_begin 
variable Pfc;        
variable Pbat;      
SOCbat=0.7;
SOCbat_opt=0.7;
SOCbat_max=0.8;
SOCbat_min=0.4;
SOCuc=0.7;
 if SOCbat>=SOCbat_min && SOCbat<=SOCbat_max
     Kbat=(1-2*(SOCbat-SOCbat_opt)/(SOCbat_max-SOCbat_min))^8;
  else 
    Kbat=(1-2*(SOCbat-SOCbat_opt)/(SOCbat_max-SOCbat_min))^16;
 end               
Nfc_opt=0.7;
Nfc_max=0.8;
Nfc_min=0.6;
Pfc_rating=10000;
Nfc=Pfc/Pfc_rating;
Kfc=(1-2*(Nfc-Nfc_opt)/(Nfc_max-Nfc_min));
KFC=pow_pos(Kfc,4);
k=0.5;             
t=1.2;                 
p=0.4;                
Cfcave=0.02;         
Pfcave=6400;       
Ndisch=0.95;                          
Ndischave=0.95;                       
Nch=0.95;                                 
Nchave=0.95;                        
      BAT=(Pbat*Ndischave*Nch*Cfcave)/Pfcave;
f=2;           
gc=70;           
cz=200;           
a=0.5;          
I=1;             
r=8.314;                   
T=358.15;          
e=1.7707;              
Vfc=380;              
F=96487;                
Ifc=Pfc/Vfc;                   
FC=1.2*f*gc*Ifc/(2*F); 
A1=[1,0];A2=[-1,0];A3=[0,1];A4=[0,-1];
b1=(1);b2=(-0.4);b3=(20000);b4=(0);
m=[SOCbat;Pfc];
 t1=0.004;   
minimize (-Kbat*BAT-KFC*FC-t1*(log(-(A3*m-b3)*(-A4*m+b4))))         %-Kbat*BAT-Kfc*FC-t2*(log(-(A3*m-b3)*(-A4*m+b4)))
                 subject to
                                SOCbat<=1;
                                -SOCbat<=-0.4;  
                                Pfc<=20000;
                                 -Pfc<=0;
                                 Pbat<=10000;
                                 -Pbat<=0;
                                Pbat+Pfc==ccc(i,:);  
cvx_end

ccc is my mat input pfile。

CVX 3.0beta is riddled with bugs. Please remove all vestiges of CVX 3.0beta from the MATLAB path, and install CVX 2.2.

The objective function is not in compliance with CVX’s rules. Have you verified that it is convex? Please carefully read the following:

thanks very much ,but also has a matter which:
Disciplined convex programming error:
Cannot perform the operation: {convex} .* {real affine}
How to solve it? please !

The problem should be KFC * FC of the objective function

Did you read the 2nd paragraph of my previous post, along with the link in that post?

I read it and reinstalled the cvx2.2 version. The current error is that CVX cannot perform real affine * convert. How can I modify it? How to solve this?

Your problem needs to be be convex.