Davidrxyang / raines-2024-line-addition-problem

MIT License
1 stars 0 forks source link

update efficiency and termination #123

Closed henrydeng2002 closed 3 weeks ago

henrydeng2002 commented 3 weeks ago
  1. changed how efficiencies are updated: modified demand is now not recalculated (I think it is unnecessary to recalculate modified demand, since it is a measure of how "important" a connection is, and lines in lineCandidates shouldn't change the "importance" of a connection to the network, as lineCandidates lines aren't necessarily added to the network). Additionally, only the worst efficiency station pair is updated, and if the station pair is still the worst efficiency after the recalculation based on path, then choose it
  2. fixed an issue with termination: previously if any line is shorter than minLength in targetEfficiencySatisfied(), the function returns false. Changed that to if any line is shorter than minLength, then the loop continues
  3. added some additional logs