Skip to content

Commit

Permalink
Fixed flexibility calculation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilmer committed Dec 10, 2014
1 parent efef1d1 commit e7a1391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/Instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def calculateFlex(self):
self.removeTransitiveConstraints()

n = len(self.activities)
maxConnections = n * (n - 1)
maxConnections = (n * (n - 1)) / 2
return float(maxConnections - numConnections) / maxConnections

def addPrecedenceConstraint(self, firstId, secondId):
Expand Down

0 comments on commit e7a1391

Please sign in to comment.