Skip to content

Commit

Permalink
fix update log
Browse files Browse the repository at this point in the history
  • Loading branch information
AsithaIndrajith committed Dec 3, 2019
1 parent 771be81 commit bb8d725
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/views/Dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class Dashboard extends React.Component {
faultSwitch: val.faultSwitch,
currentTable: val.currentTable,
prevReconfigure: val.reconfigure,
minOut: val.minOut,
minOut: val.weightFactor,
prevMapState: val.mapState,
isGenerated: val.isGenerated,
mapUpdated: val.mapUpdated
Expand Down Expand Up @@ -277,7 +277,7 @@ class Dashboard extends React.Component {
});

})
//window.location.reload(false);
//this.drawTree()
})
.catch(e => {
Expand Down
4 changes: 2 additions & 2 deletions src/views/Dashboard/drawMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ const drawGraph = (faultyFeeder, faultLoc, feed_list, noopn_list, sw_list, se_li
"width": 1000,
"d3": {
"alphaTarget": 0.05,
"gravity": -600,
"linkLength": 120,
"gravity": -1200,
"linkLength": 200,
"linkStrength": 2
},
node: {
Expand Down
31 changes: 25 additions & 6 deletions src/views/Dashboard/reconfigure.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ const findEndConnectedNOs = (faultLoc, noList, switch_table, switch_list) => {
for(let j=0;j<faultLoc.length;j++){
let end = faultLoc[j][1]
let arr = getSwitchsToSwitch(switch_list,end,switch_table)
// for(let i=0;i<arr.length;i++){
// if(!noList.includes(arr[i])){
// arr.splice(i,1)
// }
// }
let arrLen = arr.length
let removed = []
for(let i=0;i<arr.length;i++){
if(!noList.includes(arr[i])){
removed.push(arr[i])
arr.splice(i,1)
}
}
if(arrLen!==arr.length){
for(let j=0;j<removed.length;j++){
let temper = getSwitchsToSwitch(switch_list, removed[j], switch_table)
for(let k=0;k<temper.length;k++){
if(!arr.includes(temper[k])&&noList.includes(temper[k])){
arr.push(temper[k])
}
}
}
}
console.log(arr)
nos.push(arr)
}
Expand Down Expand Up @@ -184,8 +197,14 @@ const optimalPath = (allPaths, faultySection, faultPathSwitches, currentTable, s
let tempNode = switch_list[allPaths[i][0][allPaths[i][0].length-1][0]]
let tempCrnt = getSwitchCurrent(tempNode, currentTable)

let minCap = -1
let k0 = minOut[tempNode].k0

let maxOut = minOut - tempCrnt
if(k0!==0){
minCap= minOut[tempNode].minCapacity
}
console.log(tempNode+" ------------------------>>> "+minCap)
let maxOut = minCap - tempCrnt
//console.log(maxOut)
faultPathSwitches = [...new Set(faultPathSwitches)]
//console.log(faultPathSwitches)
Expand Down
7 changes: 6 additions & 1 deletion src/views/Logs/Logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ class PhysicalConnectivity extends React.Component {
}
}
render(){
const { classes } = this.props;
try{
const { classes } = this.props;
//console.log(this.state.graphs!==undefined?this.state.graphs[this.state.viewIndex]!==undefined?this.state.graphs[this.state.viewIndex][this.state.subIndex]!==undefined?this.state.graphs[this.state.viewIndex][this.state.subIndex][0]:"No":"Noo":"Nooo")
// const table_data= this.state===null?"":this.state.physicalConMatrix;
//console.log("table data"+(this.state===null?"":this.state.physicalConMatrix));
Expand Down Expand Up @@ -482,6 +483,10 @@ class PhysicalConnectivity extends React.Component {
</div>

);
}catch(err){
console.log(err)
}

}
}

Expand Down

0 comments on commit bb8d725

Please sign in to comment.