Skip to main content

Max Flow and Min-Cut in GurobiOptimods

Answered

Comments

3 comments

  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Martin,

    Currently, these are the available OptiMods: The OptiMods Gallery — Gurobi OptiMods 1.1.1dev0 documentation (readthedocs-hosted.com)

    There is a Mod implementing the Minimum-Cost Flow.

    I hope this answers your question.

    Cheers,
    Matthias

    1
  • Martin Schönheit
    Gurobi-versary
    First Comment
    First Question

    Hey Matthias,

    thank you very much for your reply. That answers my question.

    I just have one further question. In which format the input is requested for the minimum-cost flow. I tried to read a csv in the format of the dataframe in the documentation, but the function reads the information as 10 nodes, while I just have 5 defined. I would have loved to provide a screenshot but the file size is too big. 

    input_df=pd.read_csv("input_data_8.csv",keep_default_na=False).set_index(['source', 'target'])

    Is there any specific requirement how the data has to be defined?

    Kind regards

    Martin

     

    0
  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Martin,

    You can check out the input format in three different flavors (scipy, networkx, and pandas). I suggest you inspect the dataframe generated by your CSV data and adapt it according to our pandas example. This is something you would have to do by yourself, I'm afraid.

    Cheers,
    Matthias

    0

Please sign in to leave a comment.