Graph with variable link lengths

Flow for