[Lemon-user] Question about usage of network simplex

Jesse Jaanila jessejaanila at gmail.com
Wed Jan 10 23:20:50 CET 2018


Hi everyone, I’m a first-time poster to this board so be kind :)

I'm building an optimization app that is used to solve one type of scheduling problem. I realized that the problem has a structure where its sub-problem can be modeled as network flow problem; so I added lemon's network simplex to my project.

In the algorithm, I generate many solutions to the optimization problem, and I use network simplex to evaluate the score of each solution. I don't create new graphs/network simplex models at each iteration; instead, I just modify the problem with arc bounds and node supplies.

I configured the network_simplex.h file to I suit me better (I removed parts of the code I knew WON'T be ever reached because of my graphs particular structure).  At each iteration, I update the arc lower/upper bounds (I active and de-active arcs) of the simplex model.

Everything works perfectly fine until my algorithm generates a solution which is a configuration in the graph that is infeasible (insufficient flow). After that, all preceding solutions are also "infeasible" in the sense that simplex evaluates them to infeasible, but they aren't. 

The problem seems to be that after I update the first infeasible arc bounds to the network simplex and run the simplex; in the memory of the simplex there is information that I didn't reset correctly for the next model from the infeasible iteration. 

I don't run the resetParams() function because I know that I only have to update a small portion of the model and I created custom methods for that purpose. Do the network simplex internal methods ever update the internal arrays of the supplies and/or arc bounds; especially in the case when the problem is infeasible that would lead to some supply/arc bound modified?

I hope somebody can help. Thank you Lemon community.


More information about the Lemon-user mailing list