Skip to main content

Cut Generation LP ( CGLP)

Answered

Comments

3 comments

  • Official comment
    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.
  • Riley Clement
    • Gurobi Staff

    Hi Farzane,

    I need to have access to constraint matrices A, b

    Model.getA and Model.getAttr will be useful here, eg

    m = gp.Model()
    ...
    cons = m.getConstrs()
    A = m.getA()
    b = m.getAttr("RHS", cons)

     

    in addition to T, W, r

    I'm not sure what this is referring to.  A and b are well understood to be the constraint matrix and RHS but I'm guessing T, W, r may be specific to whatever resource you're referencing for column generation.  If you can translate this into standard model attributes (such as reduced cost, dual values etc) then this would help.

     

    How can I access them in a matrix/table format, not sparse?

    If A is a sparse matrix you can convert it to a numpy matrix or numpy array with A.todense() and A.toarray() respectively.

    Does gurobi have any automatic CGLP cut generation parameter settings?

    No.

    While not directly related to your question, you may find this previous post on column generation useful.

    - Riley

    0
  • Farzane Ezzati
    • Gurobi-versary
    • First Comment
    • First Question

    Hello Riley,

    Thank you so much for the help.

    By T, W, r I am refering to two-stage stochastic models. I should have been more precise.

    Your answer helped a lot regarding the sparse matrices.

    By CGLP I am refering to Cut Generation Linear Programming which is related to generating disjunctive cuts. I order to apply CGLP I need to have access to T, W, r matrices' elements. I will read the post that you provided with the link.

    Thanks,

    Farzane

     

    0

Post is closed for comments.