[Clp] Help - Input file .lp doesnot run

Francois Margot fmargot at andrew.cmu.edu
Mon Jul 16 16:40:42 EDT 2012



On 07/16/2012 04:25 PM, Matthew Saltzman wrote:
> On Mon, 2012-07-16 at 12:20 -0400, Francois Margot wrote:
>> Hi Jack:
>>
>>   > I need some help. I´m testing a problem in Clp, I wrote it in .lp to
>>   > input but the Clp doesn´t recognize the name of the constraints.
>>   >
>>   > I thought my .lp was wrong, but it works perfectly on GLPK, and it
>>   > finds the optimal solution (obj 5169.13). I tried all the
>>   > combinations I could imagine and all didn´t work. Clp tell the name
>>   >contains illegal character ":", which the documentation tell, it works
>>   > to identify the end of the name of each constraint.
>>
>>   > I have no idea how to solve this. The file is attached on email. The
>>   > Clp version was 1.14.4.
>>
>>   > The most strange thing is I used GLPK to convert the .lp file to .mps
>>   > and solved it on Clp. It works! So, I thought it could be some
>>   > problem with the .lp files.
>>
>>   > All the constraints name are according to the function
>>   > is_invalid_name( ). It must return 0 to all of them.
>>
>>   > It should be something stupid but I have no idea what it could be. I
>>   > think that´s something wrong in the line 5.
>>
>>   > Does somebody know what how can I solve this problem?
>>
>> The problem is that there is a white space between '-' and '1250' in the
>> rhs of constraint a2.
>
> Is that a bug or a feature?
>

Neither. The code expects negative numbers to be written without white 
space, as the code uses scanf() to get the rhs. No big deal to change 
it, if necessary, but this case does not seem to rattle many users.

Francois


More information about the Clp mailing list