windows 7 64bit

43 views
Skip to first unread message

ChP

unread,
Feb 25, 2013, 3:14:46 PM2/25/13
to yal...@googlegroups.com
Hello together,

i'm trying to solve a lp-problem using matlab r2012a 64bit with yalmip and clp on a 64bit computer with windows 7.
After adding the paths to yalmip, CLPx32 and/or CLPx64 and mexclp and calling the script with the lines
Opts = sdpsettings('solver','clp');
diagnostics = solvesdp(Constraints, Objective, Opts);
i get
Warning: Solver not found
and diagnostics.info holds "Solver not found".

The same script executed on a WinXP 32bit computer with the same matlab (32bit), yalmip and clp installation works.

Obviously there's a problem with the 64bit windows 7. I could not find any information about this problem by google search.
Dose anyone you have any suggestion to get it work on the 64-bit windows machine?

Thanks in advance,
Christian

Johan Löfberg

unread,
Feb 25, 2013, 3:17:37 PM2/25/13
to yal...@googlegroups.com
Are you using the OPTI Toolbox interface to CLP? That is the preferred interface, anything else is obsolete and not supported any longer.

ChP

unread,
Feb 25, 2013, 4:19:09 PM2/25/13
to yal...@googlegroups.com
Thanks for your quick response!

I miss understood the advice in http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Solvers.CLP and so so i did not use the OPTI Toolbox until know. But i successfully installed the Toolbox, the post installation Test is okay.
In matlab commandline, clp is found:
>> which clp
C:\Program Files\OptiToolbox\Solvers\clp\clp.mexw64

but when i run
Opts = sdpsettings('solver','clp');
diagnostics = solvesdp(Constraints, Objective, Opts);

the solver still could not be found.

Johan Löfberg

unread,
Feb 26, 2013, 2:07:35 AM2/26/13
to yal...@googlegroups.com
YALMIP looks for the files clp.mexextension and opti_clp.m. Most likely you don't have opti_clp in your path, or you have an old version of YALMIP. 

ChP

unread,
Feb 26, 2013, 4:23:32 AM2/26/13
to yal...@googlegroups.com
ohhh... yeah... on my desperate efforts to get the script running, i used an old version of YALMIP and forgot yesterday to change it to the current. So, finally, the solution for my question "YALMIP with Matlab x64 on Windows x64" was:

Use OPTI Toolsbox
(see install instructions)
Use the current version of YALMIP

be happy.

Thanks for the fast support,
Cheers,
Christian

Sarmad Munir

unread,
Oct 30, 2018, 11:41:00 AM10/30/18
to YALMIP
Hi Johan,

I am trying to solve an optimization problem using clp via Yalmip. I have opti_clp.m and clp.mex file added to the path but I get the error: Maximum iterations or time limit exceeded (CLP).

Can you tell me how to increase its maximum iterations? I am not able to find the documentation for this, I have tried quite a few names e.g. clp.maxiter etc but Yalmip gives an error: Unrecognized property name 'clp.maxiter'. 

Mark L. Stone

unread,
Oct 30, 2018, 12:26:13 PM10/30/18
to YALMIP
Using OptToolbox2.23 (so not the latest version):

>> op=sdpsettings;op.clp
ans
=
            algorithm
: 'automatic'
            primalTol
: 1.0000e-07
              dualTol
: 1.0000e-07
           doPresolve
: 1
    numPresolvePasses
: 5
           factorFreq
: []
    numberRefinements
: 0
         primalObjLim
: Inf
           dualObjLim
: Inf
           numThreads
: 1
             abcState
: []

I don;t see parameters for maximum iterations or maximum time.


Johan Löfberg

unread,
Oct 30, 2018, 12:56:52 PM10/30/18
to YALMIP
appears to be a bug in clp/opti

clp says this
>> help clp
  clp  Solve a LP or QP using clp
 
  THIS IS A LOW LEVEL FUNCTION - USE opti_clp() INSTEAD!
 
  clp uses the Coin-Or Linear Programming library.
 
    [x,fval,exitflag,iter,lambda] = clp(H, f, A, rl, ru, lb, ub, opts)
 
    Input arguments:
        H - quadratic objective matrix (sparse, tril, optional)
        f - linear objective vector
        A - linear constraint matrix (sparse)
        rl - linear constraint lhs
        ru - linear constraint rhs
        lb - decision variable lower bounds (optional)
        ub - decision variable upper bounds (optional)
        opts - solver options (see below)      
 
    Return arguments:
        x - solution vector
        fval - objective value at the solution
        exitflag - exit status (see below)
        iter - number of iterations taken by the solver
        lambda - structure of dual information
 
    Option Fields (all optional - see clpset):
        algorithm       - Solver algorithm (DualSimplex 0, PrimalSimplex 1, PrimalSimplexOrSprint 2, Barrier 3, BarrierNoCross 4, Automatic {5})
        primalTol       - Primal Tolerance
        dualTol         - Dual Tolerance
        maxiter         - maximum solver iterations
        maxtime         - maximum execution time [s]


but clpset genrates this

>> ops = clpset

ops = 

  struct with fields:

            algorithm: 'automatic'
            primalTol: 1.0000e-07
              dualTol: 1.0000e-07
           doPresolve: 1
    numPresolvePasses: 5
           factorFreq: []
    numberRefinements: 0
         primalObjLim: Inf
           dualObjLim: Inf
           numThreads: 1
             abcState: []

Simply add the field maxiter to the options and see if it listens for it as it claims

Reply all
Reply to author
Forward
0 new messages