Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to modelize roads with constraints?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Benoît Lafontaine  
View profile  
 More options Aug 14 2012, 4:41 am
From: Benoît Lafontaine <joel1...@gmail.com>
Date: Tue, 14 Aug 2012 01:41:34 -0700 (PDT)
Local: Tues, Aug 14 2012 4:41 am
Subject: How to modelize roads with constraints?

Hi,

I have to modelize roads. And I have the following problem

                     /--[Road]-->(C)
                    /
(A)<--[Road]-->(B)<=
                    \
                     \--[Road]-->(D)

A, C and D are points like cities, B is an intersection.
The constraint is that is not allowed to turn to C when you come from D. So
you can drive from A to C, from A to D, but you can't drive from D to C.

What's the best way to modelize such graph with this constraint?

Tx


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Taverner  
View profile  
 More options Aug 14 2012, 6:46 am
From: Craig Taverner <cr...@amanzi.com>
Date: Tue, 14 Aug 2012 12:46:41 +0200
Local: Tues, Aug 14 2012 6:46 am
Subject: Re: [Neo4j] How to modelize roads with constraints?

Here's an idea:

Model intersection nodes like B as as a set of entry/exit points to the
intersection. In your case there would be three such nodes, BA, BC and BD,
each representing the entry/exit to the road to destinations A, C and D.
The relationships between the different nodes of B would all be of a
different type than the road relationships. Traversing the graph needs a
rule that you can *never traverse two intersection relationships in a
row*(cannot drive round and round in the intersection). Then all you
need to
add is a direction constraint to the intersection relationships, and you
will have achieved your goal.

       BC---C
       /|
      / |
 A---BA |
      \ |
       \|
       BD---D

Roads:

   - A---BA, bi-directional road
   - C---BC, bi-directional road
   - D---BD, bi-directional road

Intersection:

   - BA---BD, bi-directional
   - BA---BC, bi-directional
   - BC-->BD, only one direction - you cannot turn from D to C, only from C
   to D

So, as long as your traversal algorithm respects the direction of the
relationships (both road and interesection) and also enforces the rule that
you can never traverse two intersection relationships in a row, then you
will not be able to take a right turn from D to C through the intersection.

On Tue, Aug 14, 2012 at 10:41 AM, Benoît Lafontaine <joel1...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »