#froscon @hannelita
@hannelita
How do we distribute electrical energy? How are the power plants distributed?
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
Electrical
Political
Environmental
Economy
CREATE TABLE power_plant;
CREATE TABLE city;
CREATE TABLE hydrographic_basin;
CREATE TABLE dealer;
| id | capacity ( Mwh) | transmission_line (PK) | coordinate | 
|---|---|---|---|
| 1 | 95 | 22 | |
| 2 | 11 | 1 | 
| id | usage (month, in Mwh) | population (milion) | coordinate | 
|---|---|---|---|
| 1 | 40 | 13 | |
| 2 | 11 | 2 | 
city
power_plant
| id | usage (month, in Mwh) | population (milion) | coordinate | 
|---|---|---|---|
| 1 | 40 | 13 | |
| 2 | 11 | 2 | 
| id | capacity ( Mwh) | transmission_line (PK) | coordinate | 
|---|---|---|---|
| 1 | 95 | 22 | |
| 2 | 11 | 1 | 
2. Match power plants coordinates based on supply capacity
city
power_plant
| id | usage (month, in Mwh) | population (milion) | coordinate | 
|---|---|---|---|
| 1 | 40 | 13 | |
| 2 | 11 | 2 | 
| id | capacity ( Mwh) | transmission_line (PK) | coordinate | 
|---|---|---|---|
| 1 | 95 | 22 | |
| 2 | 11 | 1 | 
3. Verify properties into transmission_lines table
city
power_plant
| id | usage (month, in Mwh) | population (milion) | coordinate | 
|---|---|---|---|
| 1 | 40 | 13 | |
| 2 | 11 | 2 | 
| id | capacity ( Mwh) | transmission_line (PK) | coordinate | 
|---|---|---|---|
| 1 | 95 | 22 | |
| 2 | 11 | 1 | 
4. Verify if there are industries nearby
city
power_plant
| id | usage (month, in Mwh) | population (milion) | coordinate | 
|---|---|---|---|
| 1 | 40 | 13 | |
| 2 | 11 | 2 | 
| id | capacity ( Mwh) | transmission_line (PK) | coordinate | 
|---|---|---|---|
| 1 | 95 | 22 | |
| 2 | 11 | 1 | 
5. Verify HDI
city
power_plant
| id | usage (month, in Mwh) | population (milion) | coordinate | 
|---|---|---|---|
| 1 | 40 | 13 | |
| 2 | 11 | 2 | 
| id | capacity ( Mwh) | transmission_line (PK) | coordinate | 
|---|---|---|---|
| 1 | 95 | 22 | |
| 2 | 11 | 1 | 
6. Verify dealers interest.
city
power_plant
| id | usage (month, in Mwh) | population (milion) | coordinate | 
|---|---|---|---|
| 1 | 40 | 13 | |
| 2 | 11 | 2 | 
| id | capacity ( Mwh) | transmission_line (PK) | coordinate | 
|---|---|---|---|
| 1 | 95 | 22 | |
| 2 | 11 | 1 | 
7. Verify if the region has alternative energy sources
city
power_plant
Maybe tables are not the best structures to represent information about energy distribution.
Powered by Arrows - http://www.apcjones.com/arrows/#
CREATE (n:PowerPlant:HydropowerPlant { name : 'Itaipu', capacity : '14000' })
 
Usina => Power Plant
Hidreletrica => Hydropower
capacidade => capacity
MATCH (a:HidropowerPlant),(b:City)
WHERE a.name = 'Itaipu' AND b.name = 'Ivaipora'
CREATE (a)-[r:PROVIDES { cable_capacity : 765, rl : 330 }]->(b)
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)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)MATCH (n:PowerPlant {capacity : 14000}),
      (c:City {name : 'Sao Paulo'})
p = shortestPath((n)-[]-(c)) RETURN pQueries determine optinal paths for energy supply
Capacity, population, coordinates
:City, :PowerPlant, :Region
Usually, elements that can be grouped deserve a label.
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)Add queries into a Git repository - https://github.com/hannelita/qconsp
Component
Trail
Sensor
Layer
CREATE TABLE component;
CREATE TABLE trail;
CREATE TABLE sensor;
CREATE TABLE layer;
Déjà vu!
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' })MATCH (a:Primary),(c:CI) 
WHERE a.name = 'R1' AND c.name = 'CI1' 
CREATE (a)-[r:TRAILS { thickness : 2, dilation : 0.5 }]->(c)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
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)MATCH (n:Sensor)-[MONITORS]-(c:Component)
WHERE n.temperature > 60
RETURN c.name, r.dilationDecide if it is the component of if it is the trail that is damaged.
Step 5: Run the following periodic query:
Questions?
hannelita@gmail.com
@hannelita