Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  How to represent a (running) network? (Martin Drautzburg)


----------------------------------------------------------------------

Message: 1
Date: Mon, 14 Jan 2013 21:51:29 +0100
From: Martin Drautzburg <martin.drautzb...@web.de>
Subject: [Haskell-beginners] How to represent a (running) network?
To: beginners@haskell.org
Message-ID: <201301142151.29765.martin.drautzb...@web.de>
Content-Type: Text/Plain;  charset="us-ascii"

Hello all,

I am trying to implement a discrete event siumulation for a logistic network. 
To do this, I need a representation of the network as such and a way to 
express what each Process does when it gets alerted by an event.

A Process has inputs and outputs which are again connected to outputs and 
inputs of other Processes. Establishing these connections constructs the 
network as such.

But the Processes also need to do something. They need to take something from 
one of their inputs, so something with it and place something on one of their 
outputs.

So I kind of have a dual usage for inputs and outputs: they play a role in the 
topology of the network and in the "function" which defines a process. How can 
I keep the two in sync? Is there a way prevent a Process from trying to use an 
output which does not exist?

What would be a good way to represent a Network anyways? I believe the classic 
approach is a list of nodes and a list vertices. In the simulation I will 
frequently have to find the process of an input or output and to find the 
input connected to an output. The node/vertices implementation seems to 
require scanning lists, which could be slow once I have thousands of 
processes.

Other than that any pointers to how to construct networks (which go beyond 
mere graphs) would be much appreciated.

-- 
Martin



------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 55, Issue 15
*****************************************

Reply via email to