メインコンテンツへスキップ

Max Flow and Min-Cut in GurobiOptimods

回答済み

コメント

4件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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.
  • Matthias Miltenberger
    • 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

    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

投稿コメントは受け付けていません。