#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
How do we distribute electrical energy? How are the power plants distributed?
#qconsp @hannelita
http://sigel.aneel.gov.br/sigel.html
Accessed in 28/3/2016
http://sigel.aneel.gov.br/sigel.html
Access in 28/3/2016
Electrical
Political
Environmental
Economy
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
Electrical
Political
Environmental
Economy
CREATE TABLE power_plant;
CREATE TABLE city;
CREATE TABLE hydrographic_basin;
CREATE TABLE dealer;
#qconsp @hannelita
id | usage (month, in Mwh) | population (milion) | coordinate |
---|---|---|---|
1 | 40 | 13 | |
2 | 11 | 2 |
city
id | capacity ( Mwh) | transmission_line (PK) | coordinate |
---|---|---|---|
1 | 95 | 22 | |
2 | 11 | 1 |
powe_plant
#qconsp @hannelita
id | usage (month, in Mwh) | population (milion) | coordinate |
---|---|---|---|
1 | 40 | 13 | |
2 | 11 | 2 |
city
id | capacity ( Mwh) | transmission_line (PK) | coordinate |
---|---|---|---|
1 | 95 | 22 | |
2 | 11 | 1 |
powe_plant
#qconsp @hannelita
2. Match power plants coordinates based on supply capacity
id | usage (month, in Mwh) | population (milion) | coordinate |
---|---|---|---|
1 | 40 | 13 | |
2 | 11 | 2 |
city
id | capacity ( Mwh) | transmission_line (PK) | coordinate |
---|---|---|---|
1 | 95 | 22 | |
2 | 11 | 1 |
powe_plant
#qconsp @hannelita
3. Verify properties into transmission_lines table
#qconsp @hannelita
#qconsp @hannelita
id | usage (month, in Mwh) | population (milion) | coordinate |
---|---|---|---|
1 | 40 | 13 | |
2 | 11 | 2 |
city
id | capacity ( Mwh) | transmission_line (PK) | coordinate |
---|---|---|---|
1 | 95 | 22 | |
2 | 11 | 1 |
powe_plant
#qconsp @hannelita
4. Verify if there are industries nearby
id | usage (month, in Mwh) | population (milion) | coordinate |
---|---|---|---|
1 | 40 | 13 | |
2 | 11 | 2 |
city
id | capacity ( Mwh) | transmission_line (PK) | coordinate |
---|---|---|---|
1 | 95 | 22 | |
2 | 11 | 1 |
powe_plant
#qconsp @hannelita
5. Verify HDI
id | usage (month, in Mwh) | population (milion) | coordinate |
---|---|---|---|
1 | 40 | 13 | |
2 | 11 | 2 |
city
id | capacity ( Mwh) | transmission_line (PK) | coordinate |
---|---|---|---|
1 | 95 | 22 | |
2 | 11 | 1 |
powe_plant
#qconsp @hannelita
6. Verify dealers interest.
id | usage (month, in Mwh) | population (milion) | coordinate |
---|---|---|---|
1 | 40 | 13 | |
2 | 11 | 2 |
city
id | capacity ( Mwh) | transmission_line (PK) | coordinate |
---|---|---|---|
1 | 95 | 22 | |
2 | 11 | 1 |
powe_plant
#qconsp @hannelita
7. Verify if the region has alternative energy sources
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
Maybe tables are not the best structures to represent information about energy distribution.
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
Powered by Arrows - http://www.apcjones.com/arrows/#
CREATE (n:PowerPlant:HydropowerPlant { name : 'Itaipu', capacity : '14000' })
#qconsp @hannelita
Usina => Power Plant
Hidreletrica => Hydropower
capacidade => capacity
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
MATCH (a:HidropowerPlant),(b:City)
WHERE a.name = 'Itaipu' AND b.name = 'Ivaipora'
CREATE (a)-[r:PROVIDES { cable_capacity : 765, rl : 330 }]->(b)
#qconsp @hannelita
#qconsp @hannelita
MATCH (a:HidrepowerPlant),(b:City)
WHERE a.name = 'Itaipu' AND b.name = 'Cascavel Oeste'
CREATE (a)-[r:PROVIDES { cable_capacity : 500 }]->(b)
MATCH (a:City),(b:City)
WHERE a.name = 'Ivaipora' AND b.name = 'Cascavel Oeste'
CREATE (a)-[r:MESH { capacidade_cabo : 500 }]->(b)
#qconsp @hannelita
#qconsp @hannelita
CREATE (n:Dealer { name : 'Fake',
percentage : 85, margin : 72 })
MATCH (a:Dealer),(b:City)
WHERE a.name = 'Ficticio' AND b.name = 'Cascavel Oeste'
CREATE (a)-[r:ATTENDS]->(b)
MATCH (a:Dealer),(b:PowerPlant)
WHERE a.name = 'Ficticio' AND b.name = 'Ita'
CREATE (a)-[r:OWNS]->(b)
#qconsp @hannelita
MATCH (n:PowerPlant {capacity : 14000}),
(c:City {name : 'Sao Paulo'})
p = shortestPath((n)-[]-(c)) RETURN p
Queries determine optinal paths for energy supply
#qconsp @hannelita
#qconsp @hannelita
Capacity, population, coordinates
#qconsp @hannelita
:City, :PowerPlant, :Region
Usually, elements can be grouped deserve a label.
#qconsp @hannelita
#qconsp @hannelita
CREATE (n:Component:Transformer
{ tag : 'F. Iguacu', type : 'Terciario', mva : 1650, total : 4 })
MATCH (a:Transformer),(b:PowerPlant)
WHERE a.tag = 'F. Iguacu' AND b.name = 'Itaipu'
CREATE (a)-[r:INSTALLED]->(b)
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
Add queries into a Git repository - https://github.com/hannelita/qconsp
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
Component
Trail
Sensor
Layer
CREATE TABLE component;
CREATE TABLE trail;
CREATE TABLE sensor;
CREATE TABLE layer;
#qconsp @hannelita
Déjà vu!
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
CREATE (n:Component:Primary { name : 'R1',
type : 'resistor', value : '10K' })
CREATE (n:Component:Primary { name : 'C1',
type : 'capacitor', group : 'polyester',
value : '100p' })
CREATE (n:Component:CI { name : 'CI1',
type : 'LM741', seller : 'Texas' })
#qconsp @hannelita
MATCH (a:Primary),(c:CI)
WHERE a.name = 'R1' AND c.name = 'CI1'
CREATE (a)-[r:TRAILS { thickness : 2, dilation : 0.5 }]->(c)
#qconsp @hannelita
CREATE (n:Component:Primary:LAYER1
{ name : 'R1', type : 'resistor', value : '10K' })
CREATE (n:Component:Primary:LAYER2
{ name : 'C1', type : 'capacitor',
group : 'polyester', value : '100p' })
CREATE (n:Component:CI:LAYER1 { name : 'CI1',
type : 'LM741', seller : 'Texas' })
Easy to fetch all the components from a specific Layer
#qconsp @hannelita
#qconsp @hannelita
CREATE (n:Sensor:LAYER1
{ name : 'SS1', type : 'light'})
CREATE (n:Sensor:LAYER2
{ name : 'SS2', type : 'temperature' })
MATCH (aPrimary),(s:Sensor)
WHERE a.name = 'R1' AND c.name = 'SS1'
CREATE (s)-[MONITORS { light : 2 }]->(a)
MATCH (a:Primary),(s:Sensor)
WHERE a.name = 'R1' AND c.name = 'SS2'
CREATE (s)-[r:MONITORS { temperature : 37 }]->(a)
#qconsp @hannelita
MATCH (n:Sensor)-[MONITORS]-(c:Component)
WHERE n.temperature > 60
RETURN c.name, r.dilation
Decide if it is the component of if it is the trail that is damaged.
Step 5: Run the following periodic query:
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
#qconsp @hannelita
Questions?
hannelita@gmail.com
@hannelita
#qconsp @hannelita