[Lemon-user] Using NetworkSimplex Algorithm

Kovács Péter kpeter at inf.elte.hu
Wed Jun 12 09:20:58 CEST 2013


Dear Heba,

> Thanks for willing to help. I had a look at your example, sounds like I'm doing the right thing.

Could you compile and run these examples correctly?

> I'm afraid I have a problem far from using NetworkSimplex. Kindly, have a look at my function that demonstrates the graph and calls the algorithm.

I had a look at it, but I can't reproduce such an error according to 
your code snippet. Could you send a shorter and simpler example that is 
a full source file (similarly to the ones I sent) and does not compile 
for you? What compiler do you use?

Additional notes on using NetworkSimplex:

1. The arc costs in your code are of double type. However, 
NetworkSimplex uses int type internally unless you explicitly specify 
other flow and/or capacity type. For example:
NetworkSimplex<ListDigraph, int, double> ns(myGraph);

2. If lower bounds are all zero, you need not specify them (cf. 
network_simplex_example1.cpp).

Best regards,
Peter


> ________________________________________
> From: Kovács Péter [kpeter at inf.elte.hu]
> Sent: Tuesday, June 11, 2013 11:20 AM
> To: T.A. Heba Essam
> Cc: lemon-user at lemon.cs.elte.hu
> Subject: Re: [Lemon-user] Using NetworkSimplex Algorithm
>
> Dear Heba Essam,
>
> I attach simple code examples that demonstrate the usage of
> NetworkSimplex. I hope they help you. Otherwise, it would be better if
> you could send a minimal code example with which the error can be
> reproduced.
>
> The first example file builds up a small network and executes the
> algorithm on it, while the second one reads a minimum cost flow problem
> from a text file given in DIMACS format (e.g. the attached example.dim
> file).
> For more information about DIMACS format, see:
> http://lpsolve.sourceforge.net/5.5/DIMACS_mcf.htm
>
> Best regards,
> Peter
>
>
> On 2013.06.11. 11:40, T.A. Heba Essam wrote:
>> Dear all,
>>
>> I'm trying to use the networksimplex algorithm but as some tutorial
>> links are down, I'm afriad I'm mis-using it.
>>
>> When I try to define a network simplex object as
>> NetworkSimplex<ListDigraph> ns(myGraphg);
>>
>> it gives me error C2205: 'IRegistrarBase `RTTI Type Descriptor'' :
>> cannot initialize extern variables with block scope
>>
>> Am I missing something?
>>
>> Please Help.
>>
>> Thanks,
>> Heba Essam
>>
>>
>> _______________________________________________
>> 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