[Cmpl] bug with readcsv

Mike Steglich mike.steglich at th-wildau.de
Mon Apr 22 15:39:02 EDT 2013


Hello Bastian,

I'm working on release 1.8 that will include pyCMPL (Cmpl's Python API and interactive shell) and CMPLServer. It is planned to release it in July or August. this release will also contain the bug fixes. If this is to late for you then I can send you a binary of the current beta version with this bug fix in the next two weeks.

Cheers,

Mike


Am 22.04.2013 um 21:26 schrieb Bastian Dörig <Bastian_D at hotmail.de>:

> Hello Mike,
> 
> thanks for your fast reply.
> 
> I've done the .csv file with windows, but I'm running cmpl with linux. I'll try to make a csv file with linux, maybe the error won't appear again.
> Could you say an approximate date when the new release will appear?
> 
> Regrads,
> Bastian
> 
> 
> 
> Am 22.04.2013 17:53, schrieb Mike Steglich:
>> Hello Bastian,
>> 
>> It seems that an old bug is appearing again. The \r\n at the end of the first line is interpreted as two new line feeds. This error should only appear at Windows.
>> 
>> It will be fixed in the next release.
>> 
>> In the meantime I would like to suggest to use a cmplData file.
>> 
>> test.cdat
>> ########
>> rows set < 1..2>
>> cols set <1..2>
>> E[rows,cols] < 10 2999
>>            10 299>
>> ######
>> 
>> test.cmpl
>> ###########
>> %data test.cdat: rows set, cols set, E[rows,cols]
>> 
>> parameters:
>>    echo count(E[,1]);
>>    echo E[1,1];
>>    echo E[1,2];
>>    echo E[2,1];
>>    echo E[2,2];
>>    #echo E[3,1];
>>    #echo E[3,2];
>> 
>> ....
>> ######
>> 
>> 
>> Thanks,
>> 
>> Mike
>> 
>> 
>> 
>> 
>> Am 22.04.2013 um 15:47 schrieb Bastian Dörig:
>> 
>>> Hello,
>>> 
>>> I've found a bug with readcsv and don't know how to fix it.
>>> I want to import a matrix from a csv file.
>>> The csv file "test.csv":
>>> 10;29999
>>> 10;299
>>> 
>>> and my cmpl file is:
>>> 
>>> parameters:
>>> E[,] := readcsv("test.csv");
>>> echo count(E[,1]);
>>> echo E[1,1];
>>> echo E[1,2];
>>> echo E[2,1];
>>> echo E[2,2];
>>> echo E[3,1];
>>> echo E[3,2];
>>> 
>>> with the output:
>>> 3 (the file contains only 2 rows, here's the first mistake)
>>> 10 (correct)
>>> 29999 (correct)
>>> 9999 (this are the last 4 digits of the last number in the first row)
>>> error (interpreter): file test.cmpl line7: Parameter E[2,2] is not defined
>>> 1 (I think this belongs to the error above)
>>> 10 (correct)
>>> 299 (correct)
>>> 
>>> 
>>> to sum up:
>>> 
>>> 10;29999
>>> 10;299
>>> is made to
>>> 10;29999
>>> 9999
>>> 10;299
>>> 
>>> the last digits of a row are put into a new row. If the csv file consists of 3 rows, there will be 5 rows after the import. It doesn't depend on the length of the rows.
>>> 
>>> 
>>> It would be nice if you could help me.
>>> 
>>> regrads,
>>> Bastian Dörig
>>> 
>>> _______________________________________________
>>> Cmpl mailing list
>>> Cmpl at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/cmpl
>> 
>> 
> 



More information about the Cmpl mailing list