Re: Excessive copies of set elements in GMPL

Domingo Alvarez Duarte <[email protected]> Fri, 17 Jul 2020 13:24:04 +0200
Newsgroups gmane.comp.gnu.glpk
Message-ID <[email protected]>
Hello Andrew !

Thank you again for reply !

Running all GMPL models in the examples folder and comparing it's output 
I found that the ones that have "SET UNION" operations was failing, 
reviewing the code I found that only "src/mpl/mpl3.c::set_union" was not 
making a working copy to return, creating a working copy there seems to 
fix the problem (all models now have the same output).

It doesn't seem to make sense penalize almost all set operations with 
"copies" only to save the creation of a working copy in "set_union".

I propose to incorporate the changes here 
https://github.com/mingodad/GLPK 
<https://github.com/mingodad/GLPK/commit/d316ba89f4f5296cb525f2efaba95aa6a5e445e2> 
to the official release.

Cheers !

On 16/7/20 22:30, Andrew Makhorin wrote:
>> Do you have any tests or know someone that has then and can share
>> then ?
>> (Preferable in a public repository.)
>>
>>
> You might try models from glpk/examples.