Hello Jinwei,

Function abs() is not available for LPs.

Use two inequalities instead:
penalty >= x-x_0;
penalty >= x0-x;

Best regards

Xypron


-------- Original-Nachricht --------
> Datum: Thu, 21 Feb 2008 17:31:59 -0500
> Von: "Jinwei Gu" <[EMAIL PROTECTED]>
> An: "Andrew Makhorin" <[EMAIL PROTECTED]>
> CC: [email protected]
> Betreff: Re: [Help-glpk] initialization of LP

> Thanks a lot for your help,  xypron and Andrew. I think the problem can be
> solved by adding a term like |x-x_0| in my objective function where x_0 is
> my initial solution, as you suggested.
> 
> I looked at glp_set_row_stat and glp_set_col_stat, but I do not understand
> how they can be used to set initial values (say, for columns)? In these
> functions, I can only set the status for rows/columns to be basic (GLP_BS)
> or non-basic (GLP_NL).
> 
> Thanks.
> 
> --Jinwei
> 

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to