[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] LP for Matrix objective function

From: Brady Hunsaker
Subject: Re: [Help-glpk] LP for Matrix objective function
Date: 19 Feb 2004 20:36:58 -0500

On Tue, 2004-02-17 at 16:53, Mandar wrote:
> Hi,
> I was going to use your package for the scheduling problem i am solving 
> using matlab function linprog(f,A,b,Aeq,beq,VLB,VUB); where my f is a 
> matrix (m*n)
> but i am facing a problem because in matlab the objective function can 
> be a matrix ,so is there anyway i can input the objective matrix of type
> Z =  C1( x1+ x2 +..xn)   + C2(x1+x2+..xn) ...+Cn(x1+x2+..+xn)
>  minimize Z
> in the glpk package?
> Please guide and correct me if i am wrong.
> -Mandar

I am not familiar with the details of Matlab's function.  In general,
however, the objective function of a linear program must be a linear
expression in the variables, so it's not possible to truly have a

In your example, if C1,...,Cn are constants and x1,...,xn are variables,
then you need to rewrite it as 
Z = (C1 + ... + Cn) x1  + (C1 + ... + Cn) x2 + ...

Looking at the documentation page for linprog at,
they also clearly state that f should be a vector.  Is it possible that
Matlab is silently using only part of your input matrix as the objective


reply via email to

[Prev in Thread] Current Thread [Next in Thread]