[Lemon-user] exception: divide by zero in v1.3 network simplex arc mixing
Kovács Péter
kpeter at inf.elte.hu
Mon Aug 19 22:43:48 CEST 2013
Hi Carlos,
Thank you for reporting this issue. It seems that the graph you have
passed to the NetworkSimplex instance is empty. I don't know whether it
is OK or not in your application. If it should not be empty, then check
the LGF file or send it to us if you can't find the problem in it.
Anyway, LEMON codes should not divide with zero even in this special
case. I opened an issue about this bug and attached a fix for it here:
http://lemon.cs.elte.hu/trac/lemon/ticket/474
You can either apply this patch or simply turn off arc mixing. In
typical cases, it does not have significant impact on the running time
and it do not cause any correctness or numerical stability problems.
Regards,
Peter
On 2013.08.16. 18:38, Carlos Carroll wrote:
> When I run LEMON 1.3, I get an unhandled exception due to division by zero
> in the following code (line 940) from network_simplex.h
>
> if (_arc_mixing) {
> // Store the arcs in a mixed order
> const int skip = std::max(_arc_num / _node_num, 3);
>
> When I set _arc_mixing to "false", the process runs without a problem.
>
> I do not have nodes labeled 0 in my input lgf, so not sure where this
> problem (_node_num = 0) originates.
> The comments in the file suggest that turning off arc mixing may result in
> slower processing times and other drawbacks.
> Is this a bug, and are there better workarounds than turning off arc mixing?
> Thanks.
> _____
>
> Carlos Carroll, Ph.D.
> Klamath Center for Conservation Research
> PO Box 104
> Orleans, CA 95556
>
>
>
>
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
>
More information about the Lemon-user
mailing list