Network Model writeNetwork

Whilst using the sdonm API I have been calculating the shortest path between two nodes. This all works very well. However when I come to write this path to the path and path_link tables the NetworkManager.writeNetwork method does nothing. More precisely I do:
Network nw=NetworkManager.readNetwork(connection,name,true);
Path shortPath=NetworkManager.shortestPath(nw,node1,node2);
shortPath.computeGeometry(0.05);
nw.addPath(shortPath);
NetworkManager.writeNetwork(connection,name);
connection.commit;
From reading around the forums I am unsure as to whether the above should work, as a workaround I am inserting the data into the table manually but it is less elegant and a lot more hassle than the above.
Help?

Hi,
I can write the path data out to the path table by using the JNDI datasource and a preparedstatement, so I don't think there is a config issue. I had a read on the internet for some hours today and from what I understand sometimes Oracle doesn't like being written to by anything other than the Oracle driver? What I mean is that the connection given by using the drivermanager method is of a different type to the JNDI method. I did read that if I used an OracleDataSource rather than a javax.sql.DataSource then this might make it work, however I have been unable to cast the JNDI connection to an OracleDataSource. i.e.
<pre>
Context ctx = new InitialContext();
OracleDataSource ds = (OracleDataSource)ctx.lookup(JNDIName);
</pre>
However this gives me a classcastexception. This seemed a little strange as in the oc4j admin pages the JNDIName is actually formed from the oracle.jdc.pool.OracleDataSource. Does this sound reasonable?

Similar Messages

  • Q: Using Path tables with Network Model (api)

    Hello
    Just a quick question to get on track.
    In order to use the Path tables from a network model and to fill the geometry field, is this the right way to start working?
    1. use the sdonm api to load network and analyse it (like the demo java file LoadAndAnlayze.java)
    2. get the link array from the path object
    3. itterate through the link array and use the
    NetworkUtility.concatenateGeometry in order to end up with one sdo_geometry line object
    4. Insert the appropriate path attributes into the Path table of the network via an SQL INSERT.
    Is this the right way or is there an othaer/better way?
    tx
    Luc

    A path by default does not have its geometry computed when it's created.
    You can use method to compute its geometry (from link geometry).
    If you have computed a path using NDM API(for example, shortestPath), you can
    1. compute path geometry by using path.computeGeometry(double tolerance)
    2. add the path to the network (network.addPath(path)
    3. use NetworkManager.writeNetwork(conn, network) to populate path and path-link tables (assuming they have been created and registered in the network metadata already!)

  • Questions on the LRS network model.

    On page 6-26 of the "Oracle Spatial Topology and Network Data Models" documentation, the example shows that measures are recorded in the 'roads' table (i.e. the one with the geometry of the feature).
    1. Why in this example is 'null' used for Node 5 ('...automatically calculated and filled...') but not the others?
    2. Why in this example is measure even necessary? There is no link to the underlying route from this table (i.e. measures should only be recorded in the context of a given route).
    3. It seems like this measure is merely the offset from the starting vertex (not true LRS); do we have the wrong interpretation?
    On Page 6-30, the example shows that measures are recorded for each Node and each Link. We had envisioned nodes and links being separate from the route they play a role upon. For example, if the same node was part of two distinct routes, does this mean storing two rows in "road_nodes"? But they're the exact same location and the same node in our network. The same question applies to the 'road_links' table. If the answer is 'duplicate the rows' in nodes and links (once per route), why doesn't 10g Spatial record 'measure' in the "road_paths" table? Note that, on page 6-31, it says that it is '...for possible future use...'...
    This example also implies the rows in the roads table are replicated as the (m)easure of the geometry column would change based on the route involved? If this is not the case why store the measure in the geometry column at all?

    Hi,
    My name is Gary Wong, and the original poster was asking these questions on my behalf. I'd like to continue the thread below in-line....
    A: This is a basic LRS concept. You can have some NULL
    measure values, and LRS can compute the actual measure
    corresponding to a NULL value. This has nothing to do
    with Network modeling, so you can assume a valid
    measure value here for this example.So this was just an example showing both 'manually calculated and entered' and 'let Spatial figure it out'? As this is merely the offset from the starting point, wouldn't a user always use NULL to let Spatial figure it out? It seems like this model will always use whole links in a contiguous fashion, so when would the measure not be the cumulative total?
    2. Why in this example is measure even necessary? There
    is no link to the underlying route from this table
    (i.e. measures should only be recorded in the context
    of a given route).So in this model (and example), the entry in roads is the route itself? Other LRS models allow the re-use of a common route, so multiple entries in the roads table would reference the same route (in another table). A real-life example is a single straight road that has different names, or has different road surface, or road classifications.
    Folowing this example, if I wanted to spatially reference some other business attribution on an existing route, say R1, would I have to create another entry in roads and duplicate the data? Even if it has the same start/end locations and path?
    A: Measure is always an offset from the start vertex
    and this is true for any LRS system. I am not sure what
    you mean by "not true LRS".My mistake in using these words; there is no true LRS, just different models/implementations of it =8^). Other LRS systems can have a measure beginning, say 2.5 metres after the starting node (node, not vertex; I define a vertex as as one of co-ordinates defining the link, and node as a topologically significant vertex such as the start and end vertices).
    Hmmm, does this answer my first question above? If you wished to start a road (as per the example) slightly off of a node, would you enter a non-zero measure as the initial co-ordinate?
    Assuming I'm on the right track (i.e. cannot re-use a route), does anyone know if Oracle plans to implement this kind of LRS in 10g Spatial?
    I see a cryptic ".. for possible future use..." reference on page 6-31 regarding the create_path_table() and create_path_link_table() methods.
    Is this future use to allow multiple uses and references of a route?
    Thanks and sorry for the loooong email..
    gary

  • Predefined network  model themes

    I am having a problem whilst trying to load one of the above into mapviewer. I have a network model that is working, valid and I can perform analysis using the SQL API. I am trying to create a theme with
    insert into user_sdo_themes values(
    'RAILNET',
    'UK Rail Network',
    'LINK',
    'L_GEOM',
    '<?xml version="1.0" standalone="yes"?>
    <styling_rules
    theme_type="network"
    network_name="RAILNET"
    network_level="1">
    <rule>
    <features>
    <link
    style="C.YELLOW"
    direction_style="M.DIRECTION"
    direction_position="0.5"
    direction_markersize="7">
    </link>
    <node
    style="M.NODE"
    markersize="5">
    </node>
    </features>
    </rule>
    </styling_rules>');
    The mapviewer returns the following (in FINEST)
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.lbs.mapserver.oms] request= <?xml version="1.0" standalone="yes"?>
    <map_request
    datasource="mvdemo"
    width="1159"
    height="793"
    bgcolor="#ffffff"
    bgimage=""
    antialiase="true"
    format="SVGZ_URL" zoomlevels="1" zoomfactor="2.0" zoomratio="1.0" infoon="true" navbar="no" onclick="shiftPressed(evt.shiftKey);svgClicked" onrectselect="shiftPressed(evt.shiftKey);svgRect">
    <center size="10.0">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates>-1.4,53.0</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <legend bgstyle="fill:#ffffff;fill-opacity:128;stroke:#ff0000" profile="SMALL" position="NORTH_EAST"><column><entry is_separator="true" /><entry text=" Map Legend " is_title="true" /><entry is_separator="true" /><entry style="L_DOWN" text="Down Track Level" /><entry style="L_UP" text="Up Track Level" /><entry style="L_BI" text="Bi-Dir Track Level" /><entry style="L_UNVAL" text="Unvalidated link" /><entry style="M.NODE" text="Track Level Node" /></column></legend>
    <themes>
    <theme name="RAILNET" min_scale="50000.0" max_scale="0.0" />
    </themes>
    </map_request>
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.JSDOGeometry] exception while getting srid from a geometry node: For input string: ""
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] getMapper(mvdemo) begins...
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] getMapper() succeeded.
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.lbs.mapserver.core.RealWorker] adding additional themes...
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.lbs.mapserver.core.RealWorker] adding a predefined theme RAILNET
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.DBMapMaker] adding predefined theme [name=RAILNET]
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.SRS] got srs object for :8307
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.SRS] *** isGeodetic=true, unit=DECIMAL DEGREE
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.SRS] before adjusting: minX = -8.707692307692307, maxX=5.907692307692308 minY=48.0, maxY=58.0 w=14.615384615384615, h=10.0
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.SRS] After adjusting: minX = -8.707692307692307, maxX=5.907692307692308 minY=48.0, maxY=58.0 w=14.615384615384615, h=10.0
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 DEBUG [oracle.sdovis.DBMapMaker] LoadThemeData running thread: Thread-8
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.theme.ntp] [Master scale] 1.2105926860025222 [Scale factor for theme RAILNET] 1.0
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.theme.ntp] ptvpxfmfxed: xl=-9.0
    05/09/29 10:22:20 Thu Sep 29 10:22:20 BST 2005 FINEST [oracle.sdovis.theme.ntp] [Geometry Network link query]: select ROWID, L_GEOM from LINK WHERE MDSYS.SDO_FILTER(L_GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(-9.0,48.0,5.907692307692308,58.0)), 'querytype=WINDOW') = 'TRUE'
    05/09/29 10:22:21 Thu Sep 29 10:22:21 BST 2005 WARN [oracle.sdovis.theme.ntp] java.lang.NullPointerException
    at oracle.sdovis.theme.NetworkThemeProducer.processGeomLinkQuery(NetworkThemeProducer.java:2467)
    at oracle.sdovis.theme.NetworkThemeProducer.prepareData(NetworkThemeProducer.java:329)
    at oracle.sdovis.NetworkTheme.prepareData(NetworkTheme.java:64)
    at oracle.sdovis.DBMapMaker$LoadThemeData.run(DBMapMaker.java:1740)
    05/09/29 10:22:21 Thu Sep 29 10:22:21 BST 2005 ERROR [oracle.sdovis.DBMapMaker] Message:null
    Description: Nested exception is:
    Message:null
    Description: Nested exception is:
    java.lang.NullPointerException
    Message:null
    Description: Nested exception is:
    java.lang.NullPointerException
    java.lang.NullPointerException
    at oracle.sdovis.theme.NetworkThemeProducer.processGeomLinkQuery(NetworkThemeProducer.java:2467)
    at oracle.sdovis.theme.NetworkThemeProducer.prepareData(NetworkThemeProducer.java:329)
    at oracle.sdovis.NetworkTheme.prepareData(NetworkTheme.java:64)
    at oracle.sdovis.DBMapMaker$LoadThemeData.run(DBMapMaker.java:1740)
    05/09/29 10:22:21 Thu Sep 29 10:22:21 BST 2005 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 202ms.
    05/09/29 10:22:21 Thu Sep 29 10:22:21 BST 2005 FINEST [oracle.sdovis.RE] xfm: 79.3 0.0 0.0 -79.3 690.5199999999999 4599.4
    05/09/29 10:22:21 Thu Sep 29 10:22:21 BST 2005 DEBUG [oracle.sdovis.VectorRenderer] time to label theme RAILNET with 0 styled features: 0ms
    If i leave the <link> tag out of the theme definition then the mapviewer loads and renders the nodes, but with the <link> included nothing is rendered.
    Help!

    That works, here is the output. I assume then that there is a bug?
    <map_request
    datasource="mvdemo"
    width="1159"
    height="793"
    bgcolor="#ffffff"
    bgimage=""
    antialiase="true"
    format="SVGZ_URL" zoomlevels="1" zoomfactor="2.0" zoomratio="1.0" infoon="true" navbar="no" onclick="shiftPressed(evt.shiftKey);svgClicked" onrectselect="shiftPressed(evt.shiftKey);svgRect">
    <center size="0.00639386189258312">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates>-1.9082991021265139,51.53651515982236</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name="RAILNET" >
    <jdbc_network_query
    network_name="RAILNET"
    network_level="1"
    jdbc_srid="8307"
    datasource="mvdemo"
    link_style="C.YELLOW"
    direction_style="M.DIRECTION"
    direction_position="0.5"
    direction_markersize="10"
    node_style="M.NODE"
    node_markersize="5"
    asis="false">
    </jdbc_network_query>
    </theme>
    </themes>
    </map_request>
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.JSDOGeometry] exception while getting srid from a geometry node: For input string: ""
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] getMapper(mvdemo) begins...
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] getMapper() succeeded.
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.lbs.mapserver.core.RealWorker] adding additional themes...
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.lbs.mapserver.core.RealWorker] adding a JDBC Network Theme:
    ThemeDescriptor=
    name=RAILNET
    type=6
    minScale=Infinity
    maxScale=-Infinity
    srid=8307
    localThem=null
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 INFO [oracle.sdovis.theme.ntd] [Network Metadata Query] select * from user_sdo_network_metadata where network = 'RAILNET'
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.SRS] got srs object for :8307
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.SRS] *** isGeodetic=true, unit=DECIMAL DEGREE
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.SRS] *** local adjustment will be performed on this req. ***
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.SRS] before adjusting: minX = -1.9158108694149043, maxX=-1.9007873348381232 minY=51.53331822887607, maxY=51.53971209076865 w=0.015023534576780994, h=0.00639386189258312
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.SRS] After adjusting: minX = -1.9158108694149043, maxX=-1.9007873348381232 minY=51.53331822887607, maxY=51.53971209076865 w=0.015023534576780994, h=0.00639386189258312
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.sdovis.DBMapMaker] LoadThemeData running thread: Thread-22
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.theme.ntp] [Master scale] 7.740362442471369E-4 [Scale factor for theme RAILNET] 1.0
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.theme.ntp] [Geometry Network link query]: select L_GEOM from LINK WHERE MDSYS.SDO_FILTER(L_GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(-1.9158108694149043,51.53331822887607,-1.9007873348381232,51.53971209076865)), 'querytype=WINDOW') = 'TRUE'
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.theme.ntp] [Network node query]: select N_GEOM from NODE WHERE MDSYS.SDO_FILTER(N_GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(-1.9158108694149043,51.53331822887607,-1.9007873348381232,51.53971209076865)), 'querytype=WINDOW') = 'TRUE'
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 50ms.
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 FINEST [oracle.sdovis.RE] xfm: 77145.62735398066 0.0 0.0 -124025.19999999895 147796.43141258793 6392223.099999947
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.sdovis.VectorRenderer] time to label theme RAILNET with 41 styled features: 0ms
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering SVG: 79ms
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 13ms
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 139ms
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 1ms
    05/09/29 15:52:10 Thu Sep 29 15:52:10 BST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 153ms
    15:52:10,319 INFO MapAction - THE ACTION IS = ZoomTo
    15:52:10,319 DEBUG MapAction - class omnieng.mapviewer.beans.PublicMapControler
    15:52:10,319 DEBUG MapAction - class omnieng.mapviewer.beans.PublicMapControler
    15:52:10,319 FATAL MapAction - NOW DOING POST PROCESS
    15:52:10,319 FATAL MapAction - NOW DONE POST PROCESS
    15:52:10,321 DEBUG HttpRequestControllerFactory - Getting controller
    15:52:10,322 DEBUG ControllerFactory - MAP_CONTROLLER
    15:52:10,322 INFO ControllerFactory - Current type is 5
    15:52:10,322 DEBUG ControllerFactory - current type is 5
    15:52:10,322 DEBUG HttpRequestControllerFactory - setting the controller omnieng.mapviewer.beans.PublicMapControler
    15:52:10,322 DEBUG HttpRequestControllerFactory - done

  • Best networking model for a java network application

    Hi all,
    I am in need of a decision regards the network technology used for a CRM.
    I am thinking about JAX-RPC to build network model for the system.I'll concider functianality details after deciding the network model.
    Which'll be better?.JAX-RPC?.i did'nt used it before.How good is that technology for a client-server CRM which need frequent remote method calls?.
    What about using servlets?.
    My requirement is i'll make XML documents from client and send to the server and server parse the XML file then make necessory method calls and return another XML data to the client.
    I cant use a database server for network functioning.Because the application should run in internet also.So installing a client-server database and only writing client application will not work.
    My application should work equally in internet and local network.
    So which technology can i implement for better results?.
    What about servlets?.
    Servlets can take inputs as web forms.But can servlets work with XML inputs with a swing client(no browser)?.
    What'll be the best technology without EJB?.Becoz only Tomcat can be used for deployment.
    Plz anyone suggest a good opinion.
    What'll the best for me?.

    Many thanks for your efforts,but i already know all what you hav said.Then you should be in fine shape for starting this project.
    But what i need is good insights.You hav told me that
    "start the project and you'll get" .OK.But after doing
    a lot of projects,Onething i know is getting as much
    insights towards a project will help always.Because
    there maybe issues that we dont concider or some
    better patterns.I can't help you based on what you've posted so far. You're talking about gathering good requirements and doing a detailed analysis and design. That's not what this forum is for. You should be doing that with your customers and teammates.
    And i'll be using JDOM.Coz it's quite easy.Very good.
    But some more insights??.
    I need insights in areas like,
    When XML file reach to controller servlet,It should
    dispatch the XML file to many javabean classes
    according to it's purpose.Do you spot anything
    there?.I don't know what those Bean classes will be doing with the XML, so it's hard to say.
    If you're looking to create an XML message broker, where clients send XML requests to be dispatched and then get the response back, you might be talking about an asynchronous application with JMS and queues. That's very different from a servlet, but then I don't know much about what you're really trying to do.
    In either case, whether you use a queue or a servlet, you'll have to think about how you'll go about routing a message. You'll have to figure out how to recognize and associate a particular XML message with the right Java Bean or destination.
    any suggestiens for creating XML files?.Sometimes you just have to bite the bullet and create them. No magic here.
    I already thank to you for ur opinions.But plz take care on these small issues also if u done such
    apps.Lets learn more together so we can make applications very very fast with good insights in
    small deeper areas.I don't mean to be rude, but I can't do any detailed analysis and design with you. That's up to you, your customer, and your teammates.

  • Question re: MapViewer and Network Model functions

    Hi all,
    Quick question re: MapViewer and it's support for the Network Model and the shortest-path functions. If I create a base map with a network theme based on my (large) network, and then use a jdbc_network_query on the same network to do some shortest path analysis will MapViewer use the (hopefully) cached copy of the Network to calculate the shortest path? i.e can I expect good response times once the cache is warmed up?
    Thanks,
    Steve

    Hi Steve,
    MapViewer uses the Network Java library to run the shortest path algorithm. This library is independent of the MapViewer cache, and also not thread safe. So for now the network is always loaded. The load time may be reduced if the request has a MBR, but it is not the ideal solution. There is a working going on, and we hope to avoid this load in future versions.
    Thanks.

  • Open soruce code of Neural Network Model of the Cerebellum

    I would like to share with the community the code of a Neural Network Model of the Cerebellum (CNN). I have been using the CNN for studying the cerebellum and for adaptive robot control. The CNN was developed using Object Oriented Programming (OOP) and a customized Address Event Representation (AER) format. Using OOP and AER allows the construction and evaluation of CNN with more than 80 k neurons, and more than 400 k synaptic connections in real time. The code includes the tools for creating the network, connecting synapses, create the AER format, and a demo for controlling a Virtual Model of a FAN.
    The link to the Cerebellar Network: https://bitbucket.org/rdpinzonm/the-bicnn-model
    Some details of the architecture of the cerebellar model:
    In comparison with traditional ANN or RNN, the CNN has a very peculiar architecture with at least three layers (see below, Fig. 1). Inputs from the external world such as the position of the arms, legs, or sensors from a robot, are carried to the cerebellum via mossy fibers (mf). mfs are then processed in the input layer that includes Golgi (Go) and Granule cells (Gr). The ratio of Gr to mf is around 1000:1, whereas Go to Gr is 15000:1. Because of these numbers it has been proposed that the input layer of the cerebellum transform the input mfs into a sparse representation easing the work of the other layers. The second layer, the molecular layer that could be regarded as a hidden layer, includes Ba/St, Basket and Stellate cells. Their numbers are similar to Go, and their role is still a matter of debate.  The last layer, the output layer, includes Purkinje cells (Pk). There are around 150.000 Gr per one Pk. This is a remarkable feature because the Pk is the only output of the cerebellar cortex. The output of the cerebellar cortex will eventualy reach the motor centers to correct movements.  The CNN includes a plausible learning rule of the cerebellum at synapses between Gr and Pk. It works a an supervised anti-Hebbian rule or a anti-correlation rule in the following way: the teaching signal carrying the information about erroneous motions of the leg, arm, robot, etc, is conveyed by the climbing fiber (cf) to a single Pk. Then, the synaptic weights og Gr-Pk are decreased if there is both cf and Gr activity, whereas if there is not cf (i.e., error) the weights are increased. What this rule means, is that those Gr producing errors have their weight decreased, while those decreasing the error are promoted by increasing their weight. 
    Fig. 1. Neural Network Model of the Cerebellum. mf, Mossy fibers (inputs); Go, Golgi Cells; Gr, Granule cells; Ba/St, Basket and Stellate cells; Pk, Purkinje Cell (Sole output of the cerebellar cortex); cf, climbing fiber (teaching signal); pf, parallel fibers (synapses of pf-Pk are the only adjustable weights in this model, and main loci in the cerebellum); and IO, inferior olivary nucleus.
    Cheers,
    As you can see, the CNN has a very interesting and simple architecture with huge potential for adaptive controller. Do not hessitate in using the model, explore its code, adn post any thought, question, comment, issue. The labview project includes a demo for constructing a CNN and employ it in a classical fedback control of a DC FAN. Fig. 2-3 are some pictures of the application:
    Fig 2. 3D construction of the CNN in LabVIEW representing a cube of the cerebellar cortex with edge length 100 um. Red mf, cyan Gr, green Go, yellow Ba/St, purple Pk.
    Fig 3. Screen capture of the demo application in LabVIEW for the CNN used for controlling a Virtual Model of a DC FAN.
    Thanks,

    Hi gerh. Nice observation! Indeed there are many good softwares out there that are optimized for constructing neural network models. However, none of them have the flexibility and the capability of integration with Hardware that LabVIEW provides. You see, the CNN is being developed to be easily incorporated into engineering applications.
    I haven't tried CV, but I think it could be possible to use the CNN with a 1D representation of the image. 

  • Designing a network model

    Hi,
    Let me start saying that im pretty newbie still considering networking. I have studied CCNA and CCNP in my school and am now working on my final work which is to design a basic network model that can be applied into small to medium sized companies.
    The network core devices are a Cisco Catalyst 3550 Switch and a Cisco PIX 515E (7.0) The C3550 will handle the traffic inside the network and connection outwards will go trough PIX Firewall.
    In the work im going to divide the ports in the switch to 3 different VLANs that will be for the assumed different departments of the company. (production,offices,administration/servers etc more added if needed)
    Im making Access-lists for every VLAN and I am wondering should I only use these ACLs to set what kind of traffic goes between the VLANs in the companys inside network and let PIX handle the traffic that enters and leaves the network? Should i have an ACL in the switch already preventing somekind of traffic going forward to the PIX?
    I have found it abit hard building access-lists for both inbound and outbound VLAN traffic as i feel i have to open alot of ports to get the most basic traffic flowing without problem in the inside network.(Programs using ports > 1024 in the return traffic getting blocked in the return packets, unless i open alot of those larger port numbers)
    Should i just limit what traffic can exit a VLAN and leave the rest of traffic flow inspection for PIX to handle? Will this provide enough security to the network provided the end stations have proper software protection and the switch is secured to prevent adding of unwanted networking devices. Im kind of unsure of the PIX device itself as my studies never crossed path with it so never got to use it before this point.
    Any views on how to handle the security in different points of the network would be greatly appriciated.
    - Jouni Forss

    Thanks for the fast reply,
    As we havent gone indepth with securing a network in our studies I feel the need to find as much info on the best practices to secure a network. All our studies have given a pretty narrow look into the ways to do that.
    Im pretty sure i will go with applying outbound traffic ACLs to each VLAN and after the switch has been secured will move onto configuring the PIX.
    Basicly the main idea is to have all the different departments connect to the server
    VLAN for resources. Only the office and admin/server VLAN will have connection to outside world. This is ofcourse just a basic idea to start building the configuration on and the ACLs would probably change depending on the real life application situation.
    Also one point was to build a possibility for VPN connections to the server VLAN from outside world which is another thing i need to get into after the switch. These connection would be coming from perhaps home office or such places with DSL connection to perform some remote management on the servers and such.
    The customers using this type of network model would be mostly behind slow connections and there wouldnt be any high load traffic going out or inside the network. (DSL etc connections)
    By reading info on the PIX i presume that in this situation it would be best to use it in Transparent mode between the C3550 and the DSL modem in question. Or maybe use PIX in routed mode and configure the outside interface to get its IP address with DHCP from the DSL modem? Or maybe some static configuration would be better there.
    One thing i would like to know about the PIX is that does it have some basic settings that would make it possible to basicly insert it to the network and it would provide some basic protection already? I guess if theres some good base that i could start building the configuration suited for the network in question.
    I find myself lacking alot of basic information concerning Firewalls/PIX even though it should be really essential in my studies. Thats why i would like to know how much does PIX ability to keep the network secured depend on the the right type of configuration or does it perform most of its measures to intercept harmfull traffic automatically with some built in methods? (Not really sure on my choice of words)
    I guess at this point i would really appriciate any tips that any of you expirienced PIX users could give me to set me on way configuring my firewall to provide sufficient protection for the network.
    - Jouni Forss

  • Import Network Model from Shapefile

    Hello,
    How to import shapefile of roads network (network data model) into oracle spatial? (Oracle+Spatial 10.2g)
    http://www.oracle.com/technology/software/products/spatial/files/shape2sdojava.zip deals only with normal (non-network) spatial data..
    Huge thanks!

    Ok, putting together your help, I managed to get myself a network model, hurray! But after this script in the end (could you peep through it and tell if anything's missing), VALIDATE_NETWORK gives me this:
    SDO_NET.VALIDATE_NETWORK('SHP_TABLE_NET')
    No Link Geom Metadata!
    How (where) would I insert that Link Geom Metadata? All I found is USER_SDO_GEOM_METADATA, but there is nowhere to insert Link data. Googled, too.
    The script, together with instructions, in case you make a nice use of it ;):
    * Import a Shapefile into Oracle Spatial as a normal vector map;
    * (ISSIT POSSIBLE TO AVOID THIS STEP? PL/SQL .sql file script? But that with DDL restrictions, clumsy variable definitions in DERLARE section etc. drove me nuts and I gave up, just asking users to do simple Find/Replace..):
    Replace all occurrences of SHP_TABLE (case sensitive, can be part of a word) in the script below with the table name of the imported map from Shapefile (copy all script from below to a text editor and perform that replace);
    * Copy/Paste (in Linux: select text and then use middle mouse button or Shift+Insert to paste it in a console) the script line-by-line, follow any severe errors (ignore ones, when it writes that table cannot be dropped when it does not actually exist :) and the like).
    -- delete any tables existing
    EXECUTE SDO_NET.DROP_NETWORK('SHP_TABLE_NET');
    DROP TABLE SHP_TABLE_PLINK$;
    DROP TABLE SHP_TABLE_EDGE$;
    DROP TABLE SHP_TABLE_NODE$;
    DROP TABLE SHP_TABLE_LINK$;
    DROP TABLE SHP_TABLE_FACE$;
    -- delete any existing geometry layer
    EXECUTE SDO_TOPO.DELETE_TOPO_GEOMETRY_LAYER('SHP_TABLE', 'SHP_TABLE_TOPO', 'FEATURE');
    DROP TABLE SHP_TABLE_TOPO;
    -- then drop existing topology
    EXECUTE SDO_TOPO.DROP_TOPOLOGY('SHP_TABLE');
    -- create new topology
    EXECUTE SDO_TOPO.CREATE_TOPOLOGY('SHP_TABLE', 0.5);
    -- insert the universal face for an empty topology
    INSERT INTO SHP_TABLE_FACE$(face_id, boundary_edge_id, island_edge_id_list, island_node_id_list, mbr_geometry)
    VALUES(-1, NULL, SDO_LIST_TYPE(), SDO_LIST_TYPE(), NULL);
    -- create an Oracle table with a feature layer
    DROP TABLE SHP_TABLE_TOPO;
    -- note, do not create unique id (PRIMARY KEY) as the data in teleatlas.dbf is inconsistent
    CREATE TABLE SHP_TABLE_TOPO(id NUMBER, feature SDO_TOPO_GEOMETRY);
    --CREATE TABLE SHP_TABLE_TOPO(id number, type varchar2(1), feature SDO_TOPO_GEOMETRY);
    -- register feature layer with topology
    EXECUTE SDO_TOPO.ADD_TOPO_GEOMETRY_LAYER('SHP_TABLE', 'SHP_TABLE_TOPO', 'FEATURE', 'CURVE');
    -- create updatable TOPO_MAP object and load the whole topology in cache
    -- since we just created the topology, the cache will be empty
    EXECUTE SDO_TOPO_MAP.DROP_TOPO_MAP('SHP_TABLE_MAP_CACHE');
    EXECUTE SDO_TOPO_MAP.CREATE_TOPO_MAP('SHP_TABLE', 'SHP_TABLE_MAP_CACHE');
    EXECUTE SDO_TOPO_MAP.LOAD_TOPO_MAP('SHP_TABLE_MAP_CACHE', 'true');
    -- copy/paste everything in one go between BEGIN and COMMIT; (including):
    -- this one will demand a considerable amount of time
    BEGIN
    FOR r IN (SELECT id, geometry FROM SHP_TABLE) LOOP
    -- associate topological primitives with features
    INSERT INTO SHP_TABLE_TOPO(id, feature)
    VALUES(r.id,
    SDO_TOPO_MAP.CREATE_FEATURE('SHP_TABLE',
    'SHP_TABLE_TOPO',
    'FEATURE',
    r.geometry)
    END LOOP;
    END;
    COMMIT;
    -- commit topology changes
    EXECUTE SDO_TOPO_MAP.COMMIT_TOPO_MAP;
    EXECUTE SDO_TOPO_MAP.DROP_TOPO_MAP('SHP_TABLE_MAP_CACHE');
    -- check how many primitives were converted (should be the same number as primitives in the DB)
    SELECT COUNT(*) FROM SHP_TABLE_TOPO;
    -- after an initial bulk load into an empty topology, initialize_metadata
    EXECUTE SDO_TOPO.INITIALIZE_METADATA('SHP_TABLE');
    -- check here what tables have been created:
    SELECT table_name FROM user_tables WHERE table_name LIKE 'SHP_TABLE_%$';
    CREATE TABLE SHP_TABLE_LINK$
    AS SELECT edge_id AS link_id,
    start_node_id,
    end_node_id,
    geometry
    FROM SHP_TABLE_EDGE$;
    -- FULL NETWORK:
    --CREATE TABLE SHP_TABLE_PATH$(PATH_ID NUMBER,
    -- PATH_NAME VARCHAR2(200),
    -- PATH_TYPE VARCHAR2(200),
    -- START_NODE_ID NUMBER NOT NULL,
    -- END_NODE_ID NUMBER NOT NULL,
    -- COST NUMBER,
    -- SIMPLE VARCHAR2(1),
    -- PATH_GEOMETRY MDSYS.SDO_GEOMETRY);
    --CREATE TABLE roads_incompl_plink$(path_id number not null, link_id number not null, seq_no number not null);
    --INSERT INTO USER_SDO_NETWORK_METADATA(
    -- network, network_category, geometry_type,
    -- node_table_name, node_geom_column,
    -- link_table_name, link_geom_column, link_direction,
    -- path_table_name, path_geom_column,
    -- path_link_table_name)
    -- VALUES(
    -- 'SHP_TABLE_NET', 'SPATIAL', 'SDO_GEOMETRY',
    -- 'SHP_TABLE_NODE$', 'GEOMETRY',
    -- 'SHP_TABLE_LINK$', 'GEOMETRY', 'UNDIRECTED',
    -- 'SHP_TABLE_PATH$', 'PATH_GEOMETRY',
    -- 'SHP_TABLE_PLINK$');
    -- MINIMAL NETWORK:
    INSERT INTO USER_SDO_NETWORK_METADATA(
    network, network_category, geometry_type,
    node_table_name, node_geom_column,
    link_table_name, link_geom_column, link_direction)
    VALUES(
    'SHP_TABLE_NET', 'SPATIAL', 'SDO_GEOMETRY',
    'SHP_TABLE_NODE$', 'GEOMETRY',
    'SHP_TABLE_LINK$', 'GEOMETRY', 'UNDIRECTED');
    SELECT SDO_NET.VALIDATE_NETWORK('SHP_TABLE_NET') FROM DUAL;
    COMMIT;

  • Baseline network model???

    Dear All,
    I want to ask about the following:
    -Baseline network model??? what is it , and how to read more about it from the Cisco point view???
    -MTTR & MTBF??? and how it is relate to the baseline network model ( increasing or decreasing)??

    Guess this document should give you a good start,
    http://www.cisco.com/en/US/tech/tk869/tk769/technologies_white_paper09186a008011e783.shtml

  • Network Model - Shortest Path

    Hi all,
    I have created spatial network containing non lrs sdo_geometry objects in Oracle 10g (Release 2). In this network model there are 33208 nodes and 42406 links.
    Now I need to write a java program to find shortest route between two selected nodes. Here is snippet of my source code.
    Connection connection = DriverManager.getConnection(dbUrl, databaseUser,   databasePassword);
    boolean readForUpdate = false;
    Network net= NetworkManager.readNetwork(connection, "SDO_ROAD_NETWORK", readForUpdate);
    Path path = NetworkManager.shortestPath(net, startNodeId ,endNodeId);
    System.out.println ("total distance " path.getCost() );+
    Link[] linkArray = path.getLinkArray();
    But this will throws an exception - Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    It was working fine for 1000 nodes and 1000 links. I tried by changing java options like -Xms and Xmx parameters but same result.
    Then I tried to find shortest route using pl/sql using following.
    DECLARE
    testNet VARCHAR2(30) := 'SDO_ROAD_NETWORK';
    startNode NUMBER := 120150;
    endNode NUMBER :=1740034;
    path NUMBER;
    linkArray SDO_NUMBER_ARRAY;
    BEGIN
    sdo_net_mem.network_manager.read_network('SDO_ROAD_NETWORK', 'FALSE');
    dbms_output.put_line('Loading finished');
    path := SDO_NET_MEM.NETWORK_MANAGER.SHORTEST_PATH_DIJKSTRA('SDO_ROAD_NETWORK', startNode, endNode);
    IF path IS NULL THEN
    dbms_output.put_line('route not found');
    return;
    END IF;
    linkArray := SDO_NET_MEM.PATH.GET_LINK_IDS(testNet, path);
    FOR i IN linkArray.first..linkArray.last
    LOOP
    dbms_output.put_line('Link -- ' || linkArray(i) || ' ' ||
    SDO_NET_MEM.LINK.GET_NAME (testNet, linkArray(i)) || ' ' ||
    SDO_NET_MEM.LINK.GET_COST (testNet, linkArray(i)));
    END LOOP;
    END;
    +/+
    But this takes nearly 4 minutes to just read the nework (sdo_net_mem.network_manager.read_network).
    Finally I dowloaded standalone java client application NDM Network Editor from OTN. This application loads entire network within 25 seconds and finds shortest route within 5 seconds.
    Please guide me how can I write improved code reading network. My requirement is to get shortest path between two nodes
    Thanks,
    Sujnan

    Hi Sujnan
    In the past there have been some performance issue for the Oracle JVM. Not sure if this addressed in the latest releases (10.r2 or 11).
    Performance Status OJVM used for SDO Network data Model 10R2.0.2
    Maybe the oracle guys can give an update.
    Luc

  • Network Model - AStar dies, Dijkstra is OK

    Hi all,
    I'm using the Network Model to model a road network. I have a problem when a "complicated path" can't be found. By this I mean two nodes that aren't connected (one of them is an island with no connectivity in the nertwork) but the intervening network "space" is complicated and extensive. When the intervening "space" is smaller then there isn't a problem.
    When I use shortestPathAStar() then my Java app just eats up memory and CPU and eventually runs out of Java heap space. When I use shortestPathDijkstra() then the code correctly works out there is not a path between the two.
    The problem for me is that i'd really like to use AStar. I'm calculating many paths through the network and A* is just so much faster....
    Are there any bugs or known issues in this area, or has anyone else seen anything? I can't find anything on Metalink.
    Thanks
    Steve

    AStart algorithm uses more memory compared to Dijkstra Algorithm in NDM API.
    If the network is not fully connected, you could use isReachable(network,startNodeID,endNodeID) method first to find out if there exists at least one path before computing the shortest path.
    The overhead for this method is small compared to the shortest path algorithms.
    You could also try to increase the heap size (using Java -Xmx heapSize) when running your application.
    By the way, what is the size of the network and what is the java heap size you use?
    What version are you using?

  • Network Model: Class casting, NPE, method design

    Hello, all!
    I have several specific questions. I have an agent-based network model which has no current (visible) errors. I have several conceptual problems with it, nonetheless. I'm going to list the problems with the associated code, and would very much appreciate any suggestions and help that can be offered.
    (1) This is in the secondary class called Node.java. Though I've never really used strings, I think I'm correctly using them in these two methods. In them, I take a 5-digit integer (culture, a random number from 10000-99999), attempt to convert it to a string, compare it to another agent's culture (digit by digit, with the int variable "similarity" increasing by 1 each time a matching digit is found), and calculate a double variable "culturalSimilarity" which will give me a percentage of .00, .20, .40, .60, .80, or 1.00 if none, some, or all of the digits match. If my predetermined value for culturalSimilarity is reached (probably 40%, and meaning that out of the 5 digit string each agent has, 2 digits match), I want the agent to change one of its non-matching digits to match one of those of the other agent. I don't actually know how to design the second method, and just have pseudocode there. First, does the first method work well, or are there things in there that I should change to improve it/make it better code? Second, how the heck do I design the second method? I don't even know where to start...
      public void howCloselyDoOurCulturesMatch() {
           String stringCulture = String.valueOf(culture);
           int similarity = 0;
           for( int i = 0; i < stringCulture.length(); ++i ) {
                if( stringCulture.equals( stringCulture.substring( i, i+1 ) ) ) {
                     similarity++;
           if ( (similarity/5) >= culturalSimilarity) {
                exchangeCulture();
      public void exchangeCulture() {
           //make one of my non-matching digits match one of his.
    (2) This is in the primary class called Model.java. I am getting a NPE in the main model in the buildModel() method at this line: "Node node = (Node) nodeList.get(i);" I think it has to do with my class casting. My casting is a mess, but I'm not sure how to fix it. Here are the three methods in which I create a network with nodes in it.
      public List makeNetwork () {
           System.out.println("Model.createWattsStrogatzNetwork() beginning.");
           List networkList = (List) NetworkFactory.createWattsStrogatzNetwork( numAgents,
                  connectRadius, pRewiring, Node.class, Edge.class);
           System.out.println("Model.makeNetwork() finished.");
           return networkList;
      public void sortNetwork() {
              Vector nodeList = new Vector();
              System.out.println("==> created variables in the step method");
              for (int i = 0; i < networkList.size(); i++) {
                   Object o = networkList.get(i);
                   if (o instanceof Edge){
                        edgeList.add(o);
                   System.out.println("==> edge added to edgeList");
                   else if (o instanceof Node){
                        nodeList.add(o);
                   System.out.println("==> node added to nodeList");
           //HELP maybe convert nodeList and edgeList back to ArrayLists with Nodes and Edges in them, not
           //Vectors with objects in them.
      private void buildModel () {
           System.out.println("Model.buildModel() beginning.");
           networkList = makeNetwork();//IS THIS A DUPLICATE?  SHOULD THIS BE HERE?
           //HELP this is defined in two different places.  nodeList needs to be only the Nodes.
           for (int i = 0; i < numAgents; i++) {
                Node node = (Node) nodeList.get(i);//HERE IS THE NULL POINTER EXCEPTION
                int x = Random.uniform.nextIntFromTo (0, worldXSize - 1);
                int y = Random.uniform.nextIntFromTo (0, worldYSize - 1);
                int nodeID = node.getID();
                node.setX(x);
                node.setY(y);
                int culture = node.getCulture();
                node.setNodeLabel ("Culture - " + culture);
                node.setBorderColor (Color.magenta);
                node.setBorderWidth (4);
                System.out.println("Model.buildModel() finished.");
      }So first, "networkList" is a List full of different kinds of information. I try to sort out the Nodes in that list with the Vector "nodeList", into which I add Objects that WERE Nodes and apparently aren't anymore. There is a comment under the method sortNetwork() saying I need the nodes back in an ArrayList, but I'm willing to go with any kind of list that ensures that the Nodes still possess the information they had when they were in networkList, specifically the edges that go into and out of them. I don't know how much information I'm stripping away from the Nodes by calling them Objects and putting them in a Vector. Any suggestions are extremely welcome.

    I think I may understand what part of the NPE problem is, but I don't know how to fix it. The problem seems to be with the variable "networkList". It stores a lot of information from the makeWattsStrogatzNetwork method. When I use this for loop:
              for (int i = 0; i < networkList.size(); i++) {
                   Object o = networkList.get(i);
                   if (o instanceof Edge){
                        edgeList.add(o);
                   System.out.println("==> edge added to edgeList");
                   else if (o instanceof Node){
                        nodeList.add(o);
                   System.out.println("==> node added to nodeList");
              }I get the NPE at the first line. My problem is that I have to iterate through networkList and all the different kinds of information it possesses, and pull all the nodes out into a Vector called nodeList. How do I do that? The big disconnect in my whole model is right here--networkList contains variables, Nodes, Edges, and parameters. I just want to suck the Nodes out of the list. What am I doing wrong?

  • Hierarchical network model for diplom

    Good day !
    I want to build infrastructure for my diplom with using open source features such packetfence, snort and others. I have laboratory with a good server and cisco catalyst 2960 for realization this features. And my main model will be designed in packet tracer 6. How you know suite of devices is very poor in this emulator ... ( i choose switch 3560 and 2911 router ). Can you advice me how can i design hierarchical network with this suite of tools ?  What technology can i use ... (can i use rpvstp+ in connection between aggregation and core layer, or link aggregation)

    I would like to know how can i achieve redundancy, security, scalability effects. I'm really needed in help (

  • Network Model

    Does anyone know of an effective way of representing a live network in Java such as in the form of a TreeModel of any kind of model.
    I don't believe that the NetworkInterface class is adequate for accomplishing this.

    I mean for a simple Local Area Network. The NetworkInterface class getSubInterfaces() method supposedly returns virtual interfaces, so I can't cast it to a treeNode and the
    getParent() method only returns the parent if the child were a virtual interface.
    I was hoping to express the treeModel in terms of the LAN router and the connected NICs as the children.

Maybe you are looking for