Network Arch bridges is known for being pretty optimal when it comes to material usage due to its elements being mainly subjected to axial forces. To add to the awesomeness it was developed by a Norwegian engineer called Per Tveit during the 50s!
Not going to share the script unfortunately, it's way too messy and therefore not very educational.
Still I want to show all bridge designers that Dynamo is a force to be reckoned with. Move the geometry over in Robot as well and run Optimo to find optimal hanger placement, width top vs bottom. Tempted to say it's revolutionary!
Tested it quickly in Infraworks as well:
Gif of flexing in real time: