[Cmpl] Problem when sets contain numeric values as strings and 'long line name' situation

Mike Steglich mike.steglich at th-wildau.de
Tue May 24 12:17:03 EDT 2016


Hi Maria,

Sorry … there actually a simple bug. If in a CmplData file an entry enclosed in double quotes only contains numbers or looks like a float then it is interpreted as an integer or a real number. I will change it as soon as possible. 

The maximum length of a line name is 100.  Only for the export to a MPS file it is restricted to nine characters. Could you send your jCmpl programme (directly to me)?

Thanks,

Mike

> Am 24.05.2016 um 17:45 schrieb Maria Giatsoglou <maria.giatsoglou at gmail.com>:
> 
> Hi Mike, 
> 
> Please find attached the model I use and the cdat file. 
> I noticed that the first error ("Implicit type conversion from string to integer is not possible") occurs both when using the Coliop environment and the Cmpl Java API. 
> If I change the numeric ids into string ones e.g. by appending a letter before each id in the 'items' set, then the model can be solved without problems in Coliop. 
> By using jCmpl, however, I get the "Line name 'fm[1220],[1],[2]' is too long" error.
> The attached cdat file is the one produced by jCmpl, which is the main way I use Cmpl (I use Coliop only for testing).
> 
> I am looking forward for your response.
> 
> Thank you once more for your help!
> 
> Maria
> 
> On Mon, May 23, 2016 at 10:31 PM, Mike Steglich <mike.steglich at th-wildau.de <mailto:mike.steglich at th-wildau.de>> wrote:
> Hello Maria,
> 
> can you send your model directly to me?
> 
> Thanks,
> 
> Mike
> 
> Am 23.05.2016 um 11:36 schrieb Maria Giatsoglou <maria.giatsoglou at gmail.com <mailto:maria.giatsoglou at gmail.com>>:
> 
>> Hi Mike, 
>> 
>> I have encountered the following situation with CMPL:
>> 
>> In my model I am importing the following parameters set from a cdat file 
>> 
>> %M set[3] < 
>> "7" "2" "10"
>> "1" "12" "7" 
>> >
>> 
>> Then, I use this set in the following expression 
>> 
>> flag := 0;
>> it {[i,j,k] in M, i != "off", j != "off", k != "off":
>>          flag:= 1; break;
>> }
>> 
>> By doing this I get the following error: "Implicit type conversion from string to integer is not possible".
>> I thought that by using double quotes, the values of set M would be interpreted and treated as strings in CMPL (as was my intention), but I found out that using 
>>  
>> %M set[3] < 
>> "7" "2" "10"
>> "1" "12" "7" 
>> >
>> 
>> or 
>> 
>> %M set[3] < 
>> 7 2 10
>> 1 12 7 
>> >
>> 
>> makes no difference.
>> 
>> Is there a way to circumvent this issue?
>> 
>> 
>> Additionally, when I try to solve my model I get the following error message:
>> "Line name 'fm[3835],[1],[2]' is too long"
>> Can I somehow change the maximum line name length in CMPL?
>> 
>> Thanks!
>> 
>> My warmest regards,
>> Maria Giatsoglou 
>> _______________________________________________
>> Cmpl mailing list
>> Cmpl at list.coin-or.org <mailto:Cmpl at list.coin-or.org>
>> http://list.coin-or.org/mailman/listinfo/cmpl <http://list.coin-or.org/mailman/listinfo/cmpl>
> <TestModel.cdat><TestModel.cmpl>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20160524/36d00e48/attachment.html>


More information about the Cmpl mailing list