[Clp] Setting equality constraints in CLP/OSI

Matthew Saltzman mjs at clemson.edu
Mon Feb 8 12:48:36 EST 2010


On Sun, 2010-02-07 at 10:39 -0800, Paul De La Musica wrote: 
> Hi,
>  
>   I am testing out a small problem with known solution by modifying
> build.cpp in the OSI example directory. My modified problem has a
> couple of equality constraints of the form 
>  
> xi-xj=L
>  
> which I implemented using the pair 
>  
> xi-xj <= L and -xi+xj <= -L
>  
> Somehow, the program keeps telling me that optimized solution cannot
> be found. I reduced the number of equality constraints to one and it
> worked fine. 
>  
> Is there an example on how to set equality constraints? 

You can (and probably should, if you don't have a special reason for
making it two one-sided constraints), just make it an equality.
Following the build.cpp example, you can make an equality constraint by
setting row_lb and row_ub to the same value.  (You make a ranged
constraint by setting row_lb and row_ub both to finite values, etc.)

>  
> Anything else I should do besides checking code?
>  
> Paul
>  
>  
>  
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp

-- 
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs





More information about the Clp mailing list