Thread Subject: linprog without objectif function

Subject: linprog without objectif function

From: david

Date: 27 Oct, 2011 10:14:14

Message: 1 of 6

Hello all,
I have a question about how to use the function linprog with a linear programming problem in the cas where we have not an objectif function to minimize or maximize. Thus, we have only a constraits .

Does anyone has an idea about this problem??

Best regards

david

Subject: linprog without objectif function

From: Bruno Luong

Date: 27 Oct, 2011 11:57:29

Message: 2 of 6

"david" wrote in message <j8batl$eeg$1@newscl01ah.mathworks.com>...
> Hello all,
> I have a question about how to use the function linprog with a linear programming problem in the cas where we have not an objectif function to minimize or maximize. Thus, we have only a constraits .
>
> Does anyone has an idea about this problem??

What about inventing a dummy objective function and plug it in?

Bruno

Subject: linprog without objectif function

From: david

Date: 27 Oct, 2011 13:05:32

Message: 3 of 6

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <j8bgv9$2ln$1@newscl01ah.mathworks.com>...
> "david" wrote in message <j8batl$eeg$1@newscl01ah.mathworks.com>...
> > Hello all,
> > I have a question about how to use the function linprog with a linear programming problem in the cas where we have not an objectif function to minimize or maximize. Thus, we have only a constraits .
> >
> > Does anyone has an idea about this problem??
>
> What about inventing a dummy objective function and plug it in?
>
> Bruno

Hi Bruno,

Could you please explain me what do you mean with a small example ?

Thanks in advance
Best regards

david

Subject: linprog without objectif function

From: Johan Löfberg

Date: 27 Oct, 2011 13:19:11

Message: 4 of 6

"david" wrote in message <j8batl$eeg$1@newscl01ah.mathworks.com>...
> Hello all,
> I have a question about how to use the function linprog with a linear programming problem in the cas where we have not an objectif function to minimize or maximize. Thus, we have only a constraits .
>
> Does anyone has an idea about this problem??
>
> Best regards
>
> david

Just give an empty objective

linprog([],A,b)

or zeros

linprog(zeros(size(A,2),1),A,b)

and it will return a feasible solution if one exists

Subject: linprog without objectif function

From: david

Date: 27 Oct, 2011 15:10:34

Message: 5 of 6

"Johan Löfberg" <loefberg@control.ee.ethz.ch> wrote in message <j8blof$ifb$1@newscl01ah.mathworks.com>...
> "david" wrote in message <j8batl$eeg$1@newscl01ah.mathworks.com>...
> > Hello all,
> > I have a question about how to use the function linprog with a linear programming problem in the cas where we have not an objectif function to minimize or maximize. Thus, we have only a constraits .
> >
> > Does anyone has an idea about this problem??
> >
> > Best regards
> >
> > david
>
> Just give an empty objective
>
> linprog([],A,b)
>
> or zeros
>
> linprog(zeros(size(A,2),1),A,b)
>
> and it will return a feasible solution if one exists

Hi Johan,
Thanks for your response. I have another problem with linprog . when i used an empty vectors for lower bounds "lb" and upper bounds "up" I get exitflag =-3 with the following message :
Exiting: One or more of the residuals, duality gap, or total relative error
 has grown 100000 times greater than its minimum value so far:
         the dual appears to be infeasible (and the primal unbounded).
         (The primal residual < TolFun=1.00e-008.)
and when i use lb as lb=zeros I get a solution with exitflag =1 , but I want to search for other possible solutions.

Have you any idea regarding this problem?

thanks in advance ,
David

Subject: linprog without objectif function

From: Marcelo Marazzi

Date: 31 Oct, 2011 20:42:04

Message: 6 of 6

Hi David:

The run that returned exitflag = -3 indicates that the problem is unbounded.

Please see this page in the documentation, under "Output arguments":
http://www.mathworks.com/help/toolbox/optim/ug/linprog.html

-Marcelo

On 10/27/2011 11:10 AM, david wrote:
> "Johan Löfberg" <loefberg@control.ee.ethz.ch> wrote in message
> <j8blof$ifb$1@newscl01ah.mathworks.com>...
>> "david" wrote in message <j8batl$eeg$1@newscl01ah.mathworks.com>...
>> > Hello all,
>> > I have a question about how to use the function linprog with a
>> linear programming problem in the cas where we have not an objectif
>> function to minimize or maximize. Thus, we have only a constraits . >
>> > Does anyone has an idea about this problem??
>> > > Best regards
>> > > david
>>
>> Just give an empty objective
>>
>> linprog([],A,b)
>>
>> or zeros
>>
>> linprog(zeros(size(A,2),1),A,b)
>>
>> and it will return a feasible solution if one exists
>
> Hi Johan, Thanks for your response. I have another problem with linprog
> . when i used an empty vectors for lower bounds "lb" and upper bounds
> "up" I get exitflag =-3 with the following message :
> Exiting: One or more of the residuals, duality gap, or total relative error
> has grown 100000 times greater than its minimum value so far:
> the dual appears to be infeasible (and the primal unbounded). (The
> primal residual < TolFun=1.00e-008.)
> and when i use lb as lb=zeros I get a solution with exitflag =1 , but I
> want to search for other possible solutions.
>
> Have you any idea regarding this problem?
> thanks in advance ,
> David

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

Contact us at files@mathworks.com