Esempio n. 1
0
import conedy as co

N = co.network()

N.randomNetwork (10,0.1,co.kuramoto(), co.weightedEdge())

N.observeAll ("output/observeAll.allStates")


for i in range (0,10):
	N.observe (i, "output/observeAll.allStates2")


N.evolve(0.0,10.0)


Esempio n. 2
0
import conedy as co

N = co.network()

N.addNode(co.kuramoto())


print "kuramoto_omega:" + str ( N.getParam(0, "kuramoto_omega"))

Esempio n. 3
0
import conedy as co

N = co.network()

i = N.addNode(co.kuramoto())
j = N.addNode(co.kuramoto())

N.addEdge(j, i, co.weightedEdge(1.0))
print "should return an error: "
if (N.isConnected()):
    print ""
print "\n"

N.clear()
N.cycle(500, 1)
print "should be connected: "
if (N.isConnected()):
    print "connected "
print "\n"

N.addNode(co.kuramoto())
print "should be disconnected: "
if not (N.isConnected()):
    print "disconnected "
import conedy as co

N = co.network()


N.cycle(10,1,co.kuramoto())


N.observePhaseCoherence("output/observePhaseCoherence.py.1")
N.evolve(0.0,10.0)
N.removeObserver()


for i in range (0, 10):
	N.setState(i, i/10.0)


N.observePhaseCoherence("output/observePhaseCoherence.py.0")
N.evolve(10.0,20.0)


Esempio n. 5
0
import conedy as co

N = co.network()

co.set("kuramoto_omega", 0.1)

co.set("samplingTime", 0.01)


#just one kuramoto oscillator
firstNodeNumber = N.addNode(co.kuramoto())
N.setState(firstNodeNumber, 0.0 )
N.observeTime("output/kuramoto.py.one")
N.observe(0,"output/kuramoto.py.one", co.component(0))
N.evolve(0.0,10.0)
N.removeObserver()


#adding a second. They should synchronize.
secondNodeNumber = N.addNode(co.kuramoto())
N.addEdge (firstNodeNumber,secondNodeNumber  ,co.weightedEdge(0.1))
N.addEdge (secondNodeNumber, firstNodeNumber ,co.weightedEdge(0.1))





#small ring of oscillators. Should not synchronize.
N.setState(firstNodeNumber, 0.0 )
N.setState(secondNodeNumber, 0.3 )
Esempio n. 6
0
import conedy as co

N = co.network()

N.cycle(10, 1, co.kuramoto())

N.observePhaseCoherence("output/observePhaseCoherence.py.1")
N.evolve(0.0, 10.0)
N.removeObserver()

for i in range(0, 10):
    N.setState(i, i / 10.0)

N.observePhaseCoherence("output/observePhaseCoherence.py.0")
N.evolve(10.0, 20.0)
Esempio n. 7
0
import conedy as co

N = co.network()

N.randomNetwork(10, 0.1, co.kuramoto(), co.weightedEdge())

N.observeAll("output/observeAll.allStates")

for i in range(0, 10):
    N.observe(i, "output/observeAll.allStates2")

N.evolve(0.0, 10.0)
Esempio n. 8
0
import conedy as co

N = co.network()

i = N.addNode(co.kuramoto())
j = N.addNode(co.kuramoto())

N.addEdge(j, i, co.weightedEdge(1.0))
print "should return an error: "
if( N.isConnected() ):
	print ""
print "\n"

N.clear()
N.cycle(500, 1)
print "should be connected: "
if( N.isConnected() ):
	print "connected "
print "\n"

N.addNode(co.kuramoto())
print "should be disconnected: "
if not( N.isConnected() ):
	print "disconnected "
Esempio n. 9
0
import conedy as co

N = co.network()

co.set("kuramoto_omega", 0.1)

co.set("samplingTime", 0.01)

#just one kuramoto oscillator
firstNodeNumber = N.addNode(co.kuramoto())
N.setState(firstNodeNumber, 0.0)
N.observeTime("output/kuramoto.py.one")
N.observe(0, "output/kuramoto.py.one", co.component(0))
N.evolve(0.0, 10.0)
N.removeObserver()

#adding a second. They should synchronize.
secondNodeNumber = N.addNode(co.kuramoto())
N.addEdge(firstNodeNumber, secondNodeNumber, co.weightedEdge(0.1))
N.addEdge(secondNodeNumber, firstNodeNumber, co.weightedEdge(0.1))

#small ring of oscillators. Should not synchronize.
N.setState(firstNodeNumber, 0.0)
N.setState(secondNodeNumber, 0.3)

N.observeTime("output/kuramoto.py.two")
N.observeAll("output/kuramoto.py.two")
N.evolve(0.0, 40.0)
N.removeObserver()

thirdNodeNumber = N.addNode(co.kuramoto())