Skip to main content

Handling very large values in the objective function for optimal transport

Answered

Comments

3 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Did you consider skipping those entries? I assume that the fraction \(\frac{1}{|x-y|}\) is some weight/cost coefficient for the distance from \(x\) to \(y\) correct? I think it is best to forbid direct transports from \(x\) to \(x\) and completely omit those \(\infty\) values.

    Best regards, 
    Jaromił

    0
  • vigneshwaran kannan
    Gurobi-versary
    Curious
    Conversationalist

    Thanks for the reply  Jaromił Najman!

    Yes $\frac{1}{|x-y|}$ is the cost function coefficient from $x$ to $y$. I have two confusions here,

    1. If I change the diagonal values, where the transportation takes place between $x$ to $x$ to some smaller values like 10e+6, does it work?

    2. As you advised if I remove the diagonal values completely from the constraint (LP) matrix as well as from the cost function matrix, Does it give the same transport map and objective minimum as the case (1) above? 

     

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    If I change the diagonal values, where the transportation takes place between $x$ to $x$ to some smaller values like 10e+6, does it work?

    You would have to test it yourself. It would definitely improve the numerics of your model.

    As you advised if I remove the diagonal values completely from the constraint (LP) matrix as well as from the cost function matrix, Does it give the same transport map and objective minimum as the case (1) above?

    I don't know your model, so you have to make sure yourself that the model still makes sense after you remove the diagonal values.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.