Advertisement
wrometr

vote2

May 25th, 2020
2,315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.59 KB | None | 0 0
  1. // Tym razem oprócz odległości do parku ważny jest też dystans do przystanku MPK
  2. // oraz ilość dostępnych na nim linii.
  3.  
  4. // Jaki jest stosunek parku do MPK zależy od Ciebie, dla przykładu:
  5. let vote (pricing:LocationPricing) =
  6.     let cityContext = pricing.Comparisions.CityLevel
  7.     let lines = pricing.Measures.Facilities.Transportation.MPK.Properites.Lines
  8.  
  9.     let maxPointsForTransportationFactor =
  10.         if(lines.Count > 5) then
  11.             5
  12.         else
  13.             lines.Count
  14.         // lub dużo prościej
  15.         min(5, lines.Count)
  16.  
  17.     cityContext.Recreation.Park.Distance
  18.     + maxPointsForTransportationFactor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement