help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Some fun with color.mod


From: Vijay Patil
Subject: Re: [Help-glpk] Some fun with color.mod
Date: Wed, 24 Mar 2010 10:29:57 +0300


On Sun, Mar 21, 2010 at 9:15 PM, Andrew Makhorin <address@hidden> wrote:
> MathProg model for Graph Coloring Problem is available in examples
> directory of GLPK distribution. I wanted to visualize the solution, by
> coloring nodes of the graph.

> So I modified the color.mod, to output/spit a dot file and fed to
> Graphviz dot program to produce PS file. Attached is modified
> color.mod and output PS file.



> The number of colors are hard coded, attached model  #39;color.mod
> #39; could be improved to generated colors dynamically based on
> solution to graph coloring problem.



Nice job :)



Thanks.
 



Does Graphviz determine the graph lay-out automatically? Or one needs
to provide an additional information for graph drawing?



Graphviz dot program :
Placement of nodes and location of the arcs is determined automatically, user 
has to just declare nodes and arcs. Layout will be such that it nodes are 
uniformly placed and arcs do not overlap nodes etc. In general algorithm tries 
to generate "nice/pretty" diagram. The algorithm that does this must be 
interesting. More information available on the Graphviz website.

Thanks





-- 
Vijay Patil
 


On Sun, Mar 21, 2010 at 9:15 PM, Andrew Makhorin <address@hidden> wrote:
> MathProg model for Graph Coloring Problem is available in examples
> directory of GLPK distribution. I wanted to visualize the solution, by
> coloring nodes of the graph.

> So I modified the color.mod, to output/spit a dot file and fed to
> Graphviz dot program to produce PS file. Attached is modified
> color.mod and output PS file.

> The number of colors are hard coded, attached model  #39;color.mod
> #39; could be improved to generated colors dynamically based on
> solution to graph coloring problem.

Nice job :)

Thanks.
 

Does Graphviz determine the graph lay-out automatically? Or one needs
to provide an additional information for graph drawing?

Graphviz dot program :
Placement of nodes and location of the arcs is determined automatically, user has to just declare nodes and arcs. Layout will be such that it nodes are uniformly placed and arcs do not overlap nodes etc. In general algorithm tries to generate "nice/pretty" diagram. The algorithm that does this must be interesting. More information available on the Graphviz website.

Thanks

--
Vijay Patil

reply via email to

[Prev in Thread] Current Thread [Next in Thread]