Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions US/CA/SLAC/.index
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ica_analysis
loadfactor
anticipation
3 changes: 3 additions & 0 deletions US/CA/SLAC/anticipation/.catalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_info.py:a=rx
folium_data.py:a=rx
folium.glm:a=r
7 changes: 7 additions & 0 deletions US/CA/SLAC/anticipation/add_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pandas as pd
csv_input = pd.read_csv('path_vege.csv')
wind_speed = 10
width = 5
csv_input['wind_speed'] = wind_speed
csv_input['width'] = width
csv_input.to_csv('path_vege.csv', index=False)
47 changes: 47 additions & 0 deletions US/CA/SLAC/anticipation/folium.glm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module powerflow;
#set relax_naming_rules=TRUE
class pole
{
double pole_height;
double position;
double linesag;
double linesway;
double contact;
double strike;
}
class point
{
double latitude;
double longitude;
double position;
double linesag;
double linesway;
double contact;
double strike;
char1024 status;
}
object pole_configuration
{
name "tower";
}
object pole_configuration
{
name "3pole";
}
object pole_configuration
{
name "2pole";
}
object pole_configuration
{
name "vert3";
}
object pole_configuration
{
name "sideT";
}
object pole_configuration
{
name "flat3";
}
#input "path_result_plot.csv" -f "table" -t "object" -C "point" -M "powerflow"
10 changes: 10 additions & 0 deletions US/CA/SLAC/anticipation/folium_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pandas as pd
csv_input = pd.read_csv('path_result.csv', \
usecols = ['position', 'latitude', 'longitude', 'linesag', 'linesway', 'contact', 'strike'])
csv_input['status'] = 'OK' # set default as OK
# read the strike value
strike_threshold = 0.1
for index, row in csv_input.iterrows():
if row['strike'] > strike_threshold:
csv_input.loc[index, "status"] = 'FAILED'
csv_input.to_csv('path_result_plot.csv', index=False)