Skip to main content

Handling very large values in the objective function for optimal transport

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • 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

    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

Post is closed for comments.