Thread Subject: optimization------linprog doesn't accept equality constraints

Subject: optimization------linprog doesn't accept equality constraints

From: Jun Li

Date: 2 May, 2008 09:34:04

Message: 1 of 7

hi, all:

i use linprog solving a linear problem. however, looking
into the solution, it seems like the linprog algorithm
ignored the equality constraints. a part code of the
problem is as following:

[p,N] = size(Y);
ue = eye(p,p);
A = kron(Y',ue);
sigma = -ones(p*N,1);
A = [A,sigma];
sigma1 = zeros(1,p*p);
sigma1 = [sigma1,1];
A = -[A;sigma1];
b = zeros(p*N+1,1);

u1 = ones(1,p);
Aeq = kron(ue,u1);
sigma0 = zeros(p,1);
Aeq = [Aeq,sigma0];
beq = Wm;

f = zeros(p*p,1);
f = [f;1];

[Q,fval] = linprog(f,A,b,Aeq,beq);

where p is 3,4,5..... and N = 1000,10000... and Y>0

if N is very small, like less than 10, it's OK.
however, if N is great than 100, or even big,
then it seems like the `linprog` algorithm doesn't take the
equality constraints into consider.

could anyone give me some help?
thank you.

Jun

Subject: optimization------linprog doesn't accept equality constraints

From: Bruno Luong

Date: 2 May, 2008 11:56:03

Message: 2 of 7

"Jun Li" <twofishleft@gmail.com> wrote in message
<fven6c$hfh$1@fred.mathworks.com>...

>
> could anyone give me some help?
> thank you.
>

Could you provide Y and Wm?

Bruno

Subject: optimization------linprog doesn't accept equality constraints

From: Jun Li

Date: 2 May, 2008 15:48:04

Message: 3 of 7

thank you so much for your reply.

yes, such as

p = 3; % number of sources
a = ones(p,1); % mean weighr of each souce
N=1000; % Number of samples
x=diag(a)*rand(pmember,N);
x=x./repmat(sum(x),pmember,1);

M = rand(p,p);
Y= M*x;

u=ones(p,1);
Wm=inv(Y(:,[1:p])')*u;

this is one case of Y, and Wm.

Subject: optimization------linprog doesn't accept equality constraints

From: Bruno Luong

Date: 2 May, 2008 18:00:27

Message: 4 of 7

"Jun Li" <twofishleft@gmail.com> wrote in message
<fven6c$hfh$1@fred.mathworks.com>...


> if N is very small, like less than 10, it's OK.
> however, if N is great than 100, or even big,
> then it seems like the `linprog` algorithm doesn't take the
> equality constraints into consider.
>

It seems like linprog fails and cannot converge to the
solution with large number of variables. Alternative: find a
better LP solver.

Bruno

Subject: optimization------linprog doesn't accept equality constraints

From: Marcus M. Edvall

Date: 5 May, 2008 22:53:34

Message: 5 of 7

TOMLAB /CPLEX will take care of any issues you have. If the solver
cannot solve the problem you can use the conflict refiner to figure
things out.

Best wishes, Marcus
Tomlab Optimization Inc.
http://tomopt.com/

Subject: optimization------linprog doesn't accept equality constraints

From: Bruno Luong

Date: 6 May, 2008 07:08:03

Message: 6 of 7

"Marcus M. Edvall" <edvall@gmail.com> wrote in message
<3132d65e-443e-4ef9-a8ed-be3921435447@34g2000hsf.googlegroups.com>...
> TOMLAB /CPLEX will take care of any issues you have.

I wonder if you have tried OP's problem. I have tested it
using another LP code (interior point method) that has
passed hundred of problem on NETLIB test set and NEMS
problems (number variables up to 35000), and it obviously
also fails here.

I'm sure any numerical SW - including TOMLAB - has its own
limit.

Bruno

Subject: optimization------linprog doesn't accept equality constraints

From: Bruno Luong

Date: 6 May, 2008 07:08:03

Message: 7 of 7

"Marcus M. Edvall" <edvall@gmail.com> wrote in message
<3132d65e-443e-4ef9-a8ed-be3921435447@34g2000hsf.googlegroups.com>...
> TOMLAB /CPLEX will take care of any issues you have.

I wonder if you have tried OP's problem. I have tested it
using another LP code (interior point method) that has
passed hundred of problem on NETLIB test set and NEMS
problems (number variables up to 35000), and it obviously
also fails here.

I'm sure any numerical SW - including TOMLAB - has its own
limit.

Bruno

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com