# Error during execution

(Gorantla Balavenkataramulu) #1

When I ran the code, I am getting the following error:

Undefined function or variable ‘last_act’.

Error in cvx_solve (line 315)
if ~found && last_solved == solved && last_act == nact,

Error in cvx_finish

Error in cvx_end (line 11)
evalin( ‘caller’, ‘cvx_finish’ );

Error in Scenario2_multiplesubchannelsperD2D (line 109)
cvx_end
how can I rectify it.

(Mark L. Stone) #2

Perhaps this is a CVX bug or problem with your CVX installation. Can you provide a complete reproducible example, with all inputs, as well as the output from cvx_version? Were there any warning or error messages when you installed CVX?

(Gorantla Balavenkataramulu) #3

## CVX: Software for Disciplined Convex Programming ©2014 CVX Research Version 3.0beta, Build 1177 (e17eb8f) Thu Mar 30 22:00:17 2017

Setting CVX paths…done.
Saving update path…done.
Searching for solvers…8 shims found.
4 solvers initialized (* = default):
Mosek 8.0.0.60 {cvx}\mosek\w64

• SDPT3 4.0 {cvx}\sdpt3
SeDuMi 1.34 {cvx}\sedumi
GLPK http://glpkmex.sourceforge.net/
3 solvers skipped due to other errors:
Gurobi {cvx}\gurobi\w64
No valid Gurobi license was found. (Please note that this
license is not the same as the CVX license; it must be
obtained directly from Gurobi Optimization.) If you do have
a Gurobi license, the the Gurobi MEX file could not find it.
Please consult the Gurobi documentation for assistance.
SCS unknown C:\Users\BALA\Documents\scs-master\matlab
CVX 3.0 requires SCS version 1.1 or later.

This solver shim is not compatible with CVX 3.0. Please contact
the authors for an update.


## WARNING: An existing copy of “square.m” was found in your MATLAB path: C:\Program Files\MATLAB\R2015b\toolbox\signal\signal\square.m Models using SQUARE() in CVX expressions will not be affected; but outside of CVX, this version will be used, and it likely has a different meaning. To avoid any confusion, just use X.^2 instead of SQUARE(X) in CVX.

(Mark L. Stone) #4

Can you provide reproducible code? Have you tried CVX 2.1 to see whether that works without error? Keep in mind that CVX 3.0 beta is a beta product, and has some bugs which are not in CVX 2.1. But if you can provide reproducible code, that will assist the CVV developer (mcg, not me) debug the error.

(Yung Shun Wang) #5

I have the same problem now with CVX 2.1. I tried to use other solvers (sedumi and sdpt3), and they works.
I think it’s caused by one of the constraint in my problem:
parameters \leq constraint value, if I scale the constraint value by 1.01 or 0.999, the problem is solvable.

I’ve saved the necessary parameters and the cvx problem part to reproduce the bug. How/where I can sent the code for help? I also found that with older version of CVX 2.1, it works without failure.

## CVX: Software for Disciplined Convex Programming ©2014 CVX Research Version 2.1, Build 1107 (ad3582d) Mon Mar 30 18:43:44 2015

Installation info:
Path: C:\Users\CCRGYS\Documents\MATLAB\cvx
MATLAB version: 9.0 (R2016a)
OS: Windows 8 amd64 version 6.2
Java version: 1.7.0_60

## CVX: Software for Disciplined Convex Programming ©2014 CVX Research Version 2.1, Build 1116 (d4cc5c5) Thu Mar 30 21:54:11 2017

Installation info:
Path: C:\Users\CCRG\Desktop\cvx(選我!選我!)
MATLAB version: 9.0 (R2016a)
OS: Windows 8 amd64 version 6.2
Java version: 1.7.0_60

## ERROR Message: Successive approximation method to be employed. For improved efficiency, Mosek is solving the dual problem. Mosek will be called several times to refine the solution. Original size: 237 variables, 72 equality constraints 4 exponentials add 32 variables, 20 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
Undefined function or variable “last_act”.

Error in cvxprob/solve (line 348)
if ~found && last_solved == solved && last_act == nact,

Error in cvx_end (line 88)
solve( prob );

Error in testbug (line 173)
cvx_end