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

how can I print the value of my continuous variable?

回答済み

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff 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 why not try our AI Gurobot?.
  • Eli Towle
    • Gurobi Staff Gurobi Staff

    Hi Xinyue,

    You can use the X attribute to retrieve a variable's value in the current solution. E.g.,

    for t in range(1,25):
        print(DESS[t].X)
        print(CESS[t].X)

    I hope this helps!

    0
  • XINYUE HU
    • Gurobi-versary
    • First Comment
    • First Question

    Yes! It works.Thank you,Eli!

    0

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