1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Cplex Python how to avoid printing the output

Discussão em 'Python' iniciado por Stack, Outubro 4, 2024 às 21:42.

  1. Stack

    Stack Membro Participativo

    after setting the objective function and constraints, i use

    prob.solve()
    print prob.solution.get_objective_value()


    actually, I just want to print the objective value, however, it displays a lot of information of cplex,

    Tried aggregator 1 time.
    LP Presolve eliminated 5 rows and 1 columns.
    All rows and columns eliminated.
    Presolve time = -0.00 sec. (0.00 ticks)
    0.5


    I just want to display the last line 0.5, how to avoid printing other information by Cplex? Thank you in advance.

    Continue reading...

Compartilhe esta Página