tags:

views:

68

answers:

2

There are certain nodes which are located at fixed distances from each other. At each of these nodes, there is a certain demand of water (in units of m^3/sec).

The nodes are connected by a network of pipes, where the length of the pipe connecting different nodes is fixed, and the flow rates through each pipe segment is calculated backward from the demand at the terminal nodes.

Now, I need to minimize the fixed cost of choosing which pipes to use, which is a function of the flow rate, the length of the pipe, and the diameter of the pipe (and, I know the correlation between the cost and these parameters in a functional form).

The constraints are that the pressure drops (actually, the dynamic head) need to be greater than specified values at each node.

I know how to convert this to a linear optimization problem (by splitting each segment into a series of pipes of varying lengths with specific diameters) and use the simplex algorithim.

What I want to do, is to implement a GUI interface, where the user can specify the nodes, the segments connecting the various nodes and the corresponding distances, and the minimum heads by simpling clicking and drawing, and entering the information in some box, so that I can use this data to calculate the optimal solution and display it.

Can someone point me to a language and reference where I can do this in an easy manner? I'm willing to put the effort and learn it as I program.

I know how to solve the optimization problem for a predefined network using linear programming, and a specific set of parameter values which I input from the command line. I want to know how to create a GUI to draw the network and input the data.

Thanks so much!

A: 

If you're already using C++, and you'd just like to develop a GUI for your app, then maybe Qt will be a good choice.

If you're asking about the optimization problem, that's another matter. I'd recommend getting that to work before worrying about the GUI.

duffymo
Thanks. To clarify, I know how to solve the optimization problem using linear programming, (ie, the simplex algorithm). I'm not specific about C++, I just want to do the GUI in an easy manner.
duffymo
Writing GUI code by hand is ok. I looked at the link and Qt seems precisely what I need. Thank you very much.
So accept the answer and vote it up.
duffymo
+1  A: 

Graphviz might be a good place to get some ideas about the GUI. Feed in your network and Graphviz will draw it. There may be some editing capability in the Graphviz code that you can start from, too, but I haven't used it.

rkb
+1 - I'm not aware of an interactive capability for Graphviz, but it's a terrific thought for visualizing the network.
duffymo