[FlopCpp] Slow problem generation

Tristram Gräbener tristramg at gmail.com
Thu Jun 7 04:55:38 EDT 2007


Thanks for the advice ! With a very small modification, I went down from 20
minutes to 40 seconds! A brain is probably the best optimization ever.

A minor improvement could be to avoid copy-ing every time the multiplicator
vector when calling Expression*::generate. It needs to be modified for the
multiplication.
Doing this modification, I gained 5% of CPU-time and a wrong constraint
matrix, so I have to dig more that direction to get it correctly. But I'm
not sure it's the effort worth.

Regards,

t.


On 6/6/07, Tim Hultberg <Tim.Hultberg at eumetsat.int> wrote:
>
> I never looked much into the generation efficiency before, except for
> ensuring that generation time is proportional to 'nz' rather than 'm'*'n'.
> Your problem shows the need to do this now.
>
> Some generation inefficiencies can be handled at modelling level, by
> substituting "such_that" by sparse subsets. But for sure there are also
> substantial optimizations possible within the library.
>
> Yes, it would be great if you would look into this.
>
> Also if you send me your model, it will help me to do this in parallel.
>
> Cheers, Tim
>
> (thanks for the nice words)
>
>
> >>> "Tristram Gräbener" <tristramg at gmail.com> 06/06/2007 11:52 >>>
> Hello,
>
> I'm quite enthusiastic about FlopC++ as is pretty effective for modeling.
>
> I'm trying to use it on a rather big problem (10'000 vars, 100'000
> constraints, and should get bigger).
> Currently it needs about 20 minutes to generate the problem and Cbc needs
> only 15 to solve it, so it isn't as nice :)
>
> I narrowed the problem down
> to  MP_constraint::coefficients(GenerateFunctor&
> f) that take to much time.
>
> Are you considering that problem, or is there even some improvement on
> that
> ? (I am using the trunk on the svn)
>
> If no, I am will look into it - but I wanted to make sure that the has
> been
> no work on it before.
>
> Otherwise, thanks for that very nice library !
>
> Regards,
>
> Tristram
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/flopcpp/attachments/20070607/f7b30fd2/attachment.html


More information about the FlopCpp mailing list