Random Grid graph simulation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Random Grid graph simulation

Liora Braunstain
Hello all,

I am looking for a way to create a random grid graph and perform simulations on it.
Basically the grid will be in the first quarter (positive x's and positive y's),
when each iteration it is blocked by some x+y=m line.

I would like to generate random graphs, when each realization depends on the current line (as some nodes will be "above" the line and so unreachable).
Edges between nodes can go only upward or to the right.

After going over the javadoc , i am still not sure if it is possible to create a random grid graph,
And as i cannot find VertexFactory examples, if it will be possible to restrict the creation of the edges.

Thank you very much! 

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users
Reply | Threaded
Open this post in threaded view
|

Re: Random Grid graph simulation

John Sichi
Administrator
Someone contributed a full grid generator a while back:

https://github.com/jgrapht/jgrapht/blob/master/jgrapht-core/src/main/java/org/jgrapht/generate/GridGraphGenerator.java
https://github.com/jgrapht/jgrapht/blob/master/jgrapht-core/src/test/java/org/jgrapht/generate/GraphGeneratorTest.java

You could start with the code for that and adapt it to your needs.


On Thu, Feb 6, 2014 at 11:01 AM, Liora Braunstain <[hidden email]> wrote:

> Hello all,
>
> I am looking for a way to create a random grid graph and perform simulations
> on it.
> Basically the grid will be in the first quarter (positive x's and positive
> y's),
> when each iteration it is blocked by some x+y=m line.
>
> I would like to generate random graphs, when each realization depends on the
> current line (as some nodes will be "above" the line and so unreachable).
> Edges between nodes can go only upward or to the right.
>
> After going over the javadoc , i am still not sure if it is possible to
> create a random grid graph,
> And as i cannot find VertexFactory examples, if it will be possible to
> restrict the creation of the edges.
>
> Thank you very much!
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> jgrapht-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgrapht-users
>

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
jgrapht-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgrapht-users