<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bora Lucas</title>
    <description>The latest articles on DEV Community by Bora Lucas (@bora_lucas_798d7bec91b784).</description>
    <link>https://dev.to/bora_lucas_798d7bec91b784</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4249470%2Fa49913c7-aab5-4b6f-b12c-ae77ac2350fc.jpg</url>
      <title>DEV Community: Bora Lucas</title>
      <link>https://dev.to/bora_lucas_798d7bec91b784</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bora_lucas_798d7bec91b784"/>
    <language>en</language>
    <item>
      <title>We made traffic faster by closing streets</title>
      <dc:creator>Bora Lucas</dc:creator>
      <pubDate>Tue, 17 Nov 2026 11:26:44 +0000</pubDate>
      <link>https://dev.to/bora_lucas_798d7bec91b784/we-made-traffic-faster-by-closing-streets-5f6i</link>
      <guid>https://dev.to/bora_lucas_798d7bec91b784/we-made-traffic-faster-by-closing-streets-5f6i</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/mlh-hackathon"&gt;MLH x DEV Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  You may think Timișoara has good traffic.
&lt;/h3&gt;

&lt;p&gt;Then it's &lt;strong&gt;8 in the morning&lt;/strong&gt;. Or &lt;strong&gt;5 in the afternoon&lt;/strong&gt;. Calea Martirilor isn't moving, Waze sends you down a side&lt;br&gt;
street you've never seen, and that street is full too.&lt;/p&gt;

&lt;p&gt;So what's the usual answer? &lt;strong&gt;&lt;em&gt;More roads. More lanes. More space for cars.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  What if I told you that closing a street, or taking a lane away from cars, can make traffic &lt;em&gt;lighter&lt;/em&gt;?
&lt;/h3&gt;
&lt;/blockquote&gt;

&lt;p&gt;It sounds backwards. It's a real effect, proven in traffic science for over 50 years: &lt;strong&gt;Braess's paradox&lt;/strong&gt;. And we&lt;br&gt;
built the first tool that finds where it happens in Timișoara.&lt;/p&gt;
&lt;h3&gt;
  
  
  🚦 Meet Paradox: a Braess-paradox stress tester for Timișoara, built for Primăria Timișoara.
&lt;/h3&gt;

&lt;p&gt;Before the city spends a single leu, it can test an idea on the real streets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚧 &lt;strong&gt;Close a street&lt;/strong&gt;, and see where every car goes.&lt;/li&gt;
&lt;li&gt;🚌 &lt;strong&gt;Give a lane to buses, bikes or a wider sidewalk&lt;/strong&gt;, and see what it really costs drivers, &lt;strong&gt;in seconds&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;🛠️ &lt;strong&gt;Planning road works?&lt;/strong&gt; Close the street in Paradox first, and see which side streets fill up and which
intersections suffer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No waiting weeks for a study just to learn whether an idea is worth studying. The city can argue with &lt;strong&gt;numbers&lt;br&gt;
instead of opinions&lt;/strong&gt; about where the next bike or bus lane should go, and design transport that works for&lt;br&gt;
&lt;strong&gt;everyone&lt;/strong&gt;: people in cars and people who aren't.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧲 How does it know? Every zone of the city is a magnet.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🏠 &lt;strong&gt;Homes push cars out.&lt;/strong&gt; From every building (its size, its floors, its type) we estimate how many people live
there and how many car trips they make at rush hour.&lt;/li&gt;
&lt;li&gt;🏫 &lt;strong&gt;Destinations pull cars in.&lt;/strong&gt; Schools, offices, shops and clinics each attract trips. The bigger the pull and the
closer the destination, the more cars head there.&lt;/li&gt;
&lt;li&gt;🚗 &lt;strong&gt;Every driver is selfish.&lt;/strong&gt; That's human: each one takes the route that's fastest for them, exactly as Waze tells
them. We compute the moment nobody can get there faster by switching. That's the &lt;strong&gt;Wardrop equilibrium&lt;/strong&gt;, solved
with a classic graph algorithm, &lt;strong&gt;Frank-Wolfe&lt;/strong&gt;, in a tenth of a second.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  ⚡ And here's the paradox.
&lt;/h3&gt;

&lt;p&gt;When everyone takes the same shortcut, it floods the intersection it leads into and slows down everyone else.&lt;br&gt;
&lt;strong&gt;Remove the shortcut, and the intersection breathes again.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In our model, closing &lt;strong&gt;Piața Tineretului&lt;/strong&gt; at rush hour gets drivers on Calea Martirilor home &lt;strong&gt;13 seconds sooner&lt;/strong&gt;.&lt;br&gt;
At midday it doesn't help, so the tool tells the city when &lt;em&gt;not&lt;/em&gt; to do it, too.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  🚌 And it nudges people toward public transport.
&lt;/h3&gt;

&lt;p&gt;For every bus lane, Paradox shows &lt;strong&gt;how many drivers would need to switch to the bus for it to cost nothing&lt;/strong&gt;. Next to&lt;br&gt;
it is what real people in Timișoara told us in our survey, so the city can see &lt;strong&gt;a greener street can still be a fast&lt;br&gt;
street&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Paradox: test it before you build it. 🚦
&lt;/h2&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Under the hood
&lt;/h3&gt;

&lt;p&gt;We started where the stakes are high: the &lt;strong&gt;Calea Martirilor / Strada Cluj corridor&lt;/strong&gt;, one of the city's main arteries,&lt;br&gt;
with 9,500 cars an hour at the morning rush. Because the whole engine is built straight from &lt;strong&gt;OpenStreetMap&lt;/strong&gt; and the&lt;br&gt;
&lt;strong&gt;city's own open data&lt;/strong&gt;, pointing it at any other neighbourhood of Timișoara is a configuration change, not a rewrite.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The real street network&lt;/strong&gt; from OpenStreetMap: 385 street segments, 30 traffic lights, lanes, speed limits, 39 turn
bans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Then we try everything&lt;/strong&gt;: close every busy street segment, take a lane from every multi-lane street, re-solve the
whole city each time. About 300 scenarios per hour of the day, in ~10 seconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The time on each street follows the classic BPR curve:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;time = free time × (1 + 0.15 × (cars ÷ capacity)⁴)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Quiet streets barely slow down; full ones slow down fast. That steep curve is exactly what lets a shortcut hurt&lt;br&gt;
everyone. Our solver reproduces the textbook Braess example exactly (&lt;strong&gt;65 minutes without the shortcut, 80 with it&lt;/strong&gt;),&lt;br&gt;
and that's one of our 64 automated tests.&lt;/p&gt;

&lt;p&gt;Our approach follows Burov et al., &lt;em&gt;Detecting Braess Routes&lt;/em&gt; (UC Berkeley, IEEE ITSC 2021). They found the paradox&lt;br&gt;
disappears when traffic is light. &lt;strong&gt;So did we&lt;/strong&gt;: no Braess street at midday, several at rush hour.&lt;/p&gt;
&lt;h3&gt;
  
  
  We asked real people
&lt;/h3&gt;

&lt;p&gt;We ran a survey with 31 people in Timișoara:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;68%&lt;/strong&gt; think closing a side street makes traffic worse (0% think it helps)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;96%&lt;/strong&gt; of drivers follow the shortcuts their navigation app suggests&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;50%&lt;/strong&gt; go around the main roads through side streets, and one of the streets they named, &lt;strong&gt;Strada Cozia&lt;/strong&gt;, is one
of the Braess streets our app found&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The answers feed back into the app: they check our assumptions (car share, people per car) against the city's mobility&lt;br&gt;
plan.&lt;/p&gt;
&lt;h3&gt;
  
  
  What we learned (mostly at 3am) 🔥
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Our app counted bus lanes as car lanes.&lt;/strong&gt; OpenStreetMap includes bus lanes in &lt;code&gt;lanes=4&lt;/code&gt;. Strada Cluj looked like it
had a phantom fourth car lane, so taking a lane away "did nothing". One line of tag parsing later, it finally reacted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real turn restrictions disconnected the city.&lt;/strong&gt; Importing every "no left turn" from OSM made 38 trips impossible.
We now add each restriction only if every neighbourhood can still reach every other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A street that "never changed".&lt;/strong&gt; We spent a while hunting a bug where removing a lane gave 0.00%. It wasn't a bug:
it was a 25-metre stub at the edge of the map, 12% full. Not every street matters, and the app is honest about it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  What we're proud of
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It runs on &lt;strong&gt;real streets and real city data&lt;/strong&gt;, not a toy network&lt;/li&gt;
&lt;li&gt;Every number shows &lt;strong&gt;where it comes from&lt;/strong&gt;, and the app says plainly that traffic is &lt;em&gt;estimated&lt;/em&gt; until someone counts it&lt;/li&gt;
&lt;li&gt;It's fast enough to use live in a meeting&lt;/li&gt;
&lt;li&gt;It's &lt;strong&gt;open source (MIT)&lt;/strong&gt;, so any city can run it&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  What's next
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One morning of traffic counts&lt;/strong&gt; at the 16 entry points turns "estimated" into "calibrated"&lt;/li&gt;
&lt;li&gt;Queues at traffic lights that grow with traffic, so bus lanes show their real benefit&lt;/li&gt;
&lt;li&gt;Trams and cycling demand&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every neighbourhood of Timișoara&lt;/strong&gt;, one corridor at a time, from the same OpenStreetMap pipeline&lt;/li&gt;
&lt;li&gt;A pilot with City Hall on their next real lane project: test it here first, then build it&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;



&lt;p&gt;Click a street, change its lanes, and the whole map re-solves in a blink: blue where traffic gets lighter, orange where it piles up, and the seconds won or lost for every route.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Code: &lt;a href="https://github.com/lucasbora/Parad0x" rel="noopener noreferrer"&gt;github.com/lucasbora/Parad0x&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Partner Technologies
&lt;/h2&gt;

&lt;p&gt;We didn't lean on a sponsor API. Paradox is built almost entirely on &lt;strong&gt;open data&lt;/strong&gt;, because a city tool should run on things the city already owns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenStreetMap (Overpass API)&lt;/strong&gt; gives us the whole street graph: lanes, speed limits, traffic lights, turn restrictions, buildings and points of interest. It's amazing data, but it's written by humans for humans, so half the work was parsing it carefully (see the bus-lane bug above: &lt;code&gt;lanes=4&lt;/code&gt; doesn't mean four car lanes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Primăria Timișoara's open APIs&lt;/strong&gt; (&lt;code&gt;cont.primariatm.ro&lt;/code&gt;) for STPT bus lines and live timetables, ticket prices and Timpark parking zones. That's how Paradox knows which buses actually run on a street before you take a lane from it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python, FastAPI, NumPy, SciPy&lt;/strong&gt; for the traffic model, and &lt;strong&gt;React, TypeScript, Vite, Tailwind, MapLibre GL&lt;/strong&gt; with OpenFreeMap tiles for the map.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Hackathon Experience
&lt;/h2&gt;

&lt;p&gt;We built Paradox at &lt;strong&gt;UniHack 2026&lt;/strong&gt; in Timișoara, as a team of four: Lucas, Rareș, Laura and Adriana.&lt;/p&gt;

&lt;p&gt;And honestly, building for our own city hit different. These aren't streets on a slide, they're the streets we sit in every morning. Every time the solver flagged a street, someone on the team went "wait, I drive through there" and we pulled it up on the map to argue about it. The energy in the room did the rest: laptops everywhere, people pitching ideas to each other at 1am, coffee that stopped working around hour twenty, and everyone still happy to stop and look at what the team next to them had built.&lt;/p&gt;

&lt;p&gt;The four of us split the work hard: the traffic model and solver, the map and UI, the city data and the survey. Then we spent the last night stitching it all together.&lt;/p&gt;

&lt;p&gt;Our weekend in one picture: &lt;strong&gt;two UIs, one weekend.&lt;/strong&gt; One teammate rebuilt the whole design while another rewired the backend. We merged at 2am and again at 3am, and somewhere in there a stuck vim swap file guarded the merge like a boss fight. We won it.&lt;/p&gt;

&lt;p&gt;What we'll remember most is the moment the survey came back and the people of Timișoara named &lt;strong&gt;Strada Cozia&lt;/strong&gt; as their favourite rat-run, the same street our solver had already flagged as a Braess street. That's when it stopped feeling like a hackathon toy.&lt;/p&gt;
&lt;h2&gt;
  
  
  Try it / read the code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/lucasbora" rel="noopener noreferrer"&gt;
        lucasbora
      &lt;/a&gt; / &lt;a href="https://github.com/lucasbora/Parad0x" rel="noopener noreferrer"&gt;
        Parad0x
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Braess Paradox Solver 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Timișoara Traffic Stress Tester&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/lucasbora/Parad0x#rom%C3%A2n%C4%83" rel="noopener noreferrer"&gt;Română&lt;/a&gt; · &lt;a href="https://github.com/lucasbora/Parad0x#english" rel="noopener noreferrer"&gt;English&lt;/a&gt;&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Română&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Despre proiect&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;Un instrument pentru &lt;strong&gt;Primăria Municipiului Timișoara&lt;/strong&gt; care arată ce se întâmplă cu
traficul din zona &lt;strong&gt;Calea Martirilor / Strada Cluj&lt;/strong&gt; când schimbi o stradă: o închizi pentru mașini sau dai o bandă
auto autobuzului, bicicletelor ori trotuarului.&lt;/p&gt;
&lt;p&gt;Aplicația găsește străzile unde, dacă iei loc mașinilor, traficul din zonă devine &lt;strong&gt;mai rapid&lt;/strong&gt; (paradoxul Braess),
schimbările care aproape nu costă nimic șoferii și pe cele care ar bloca zona. Nu înlocuiește un studiu de trafic: arată
care idei merită unul.&lt;/p&gt;
&lt;p&gt;Destinatari: &lt;strong&gt;Direcția Generală de Investiții și Mentenanță&lt;/strong&gt; (modificări de străzi) și &lt;strong&gt;SMTT / STPT&lt;/strong&gt; (benzi de autobuz).&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Ce poți face&lt;/h3&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Alegi o stradă și modifici benzile; harta și rezultatele se actualizează imediat.&lt;/li&gt;
&lt;li&gt;Vezi timpul total petrecut în trafic, rutele afectate (în secunde), unde se mută traficul, așteptarea la intersecții
și liniile STPT de pe stradă.&lt;/li&gt;
&lt;li&gt;Compari dimineața, prânzul și seara: o măsură…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/lucasbora/Parad0x" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;If you work on streets, buses or bikes in your city, we'd love to hear from you in the comments. 🚦&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>devchallenge</category>
      <category>hackathon</category>
      <category>python</category>
    </item>
  </channel>
</rss>
