Pyomo Bonmin提前检索结果

时间:2017-06-26 14:05:26

标签: python pyomo

我在一个相当复杂的模型上使用Pyomo和Bonmin并且它耗费了12个多小时来计算。

我尝试将参数“bonmin.time_limit”设置为1800(30分钟),但它没有返回任何变量值。

> ==========================================================
> = Solver Results                                         =
> ==========================================================
> ----------------------------------------------------------
>   Problem Information
> ----------------------------------------------------------
> Problem:
> - Lower bound: -inf
>   Upper bound: inf
>   Number of objectives: 1
>   Number of constraints: 0
>   Number of variables: 0
>   Sense: unknown
> ----------------------------------------------------------
>   Solver Information
> ----------------------------------------------------------
Solver:
> - Status: warning
>   Message: bonmin\x3a Optimization interupted on limit.
>   Termination condition: maxIterations
>   Id: 410
>   Error rc: 0
>   Time: 1813.3797194957733
> ----------------------------------------------------------
>   Solution Information
> ----------------------------------------------------------
Solution:
> - number of solutions: 0
>   number of solutions displayed: 0

它输出多个信息的“块”。

有时,它输出:

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 600 -2.7877808e+005 1.82e-012 6.71e-003 -11.0 2.75e+000 -10.5 1.00e+000 5.56e-001h  1
 601 -2.7877808e+005 1.82e-012 6.79e-010 -11.0 1.05e+000 -10.0 1.00e+000 1.00e+000f  1
Number of Iterations....: 601
                                   (scaled)                 (unscaled)
Objective...............: -7.4080060189689470e+002  -2.7877808250893821e+005
Dual infeasibility......:  6.7945537380025706e-010   2.5569264627135494e-007
Constraint violation....:  1.8189894035458565e-012   1.8189894035458565e-012
Complementarity.........:  8.6460028294267016e-011   3.2536637848060228e-008
Overall NLP error.......:  6.7945537380025706e-010   2.5569264627135494e-007

Number of objective function evaluations             = 1075
Number of objective gradient evaluations             = 516
Number of equality constraint evaluations            = 1075
Number of inequality constraint evaluations          = 1075
Number of equality constraint Jacobian evaluations   = 604
Number of inequality constraint Jacobian evaluations = 604
Number of Lagrangian Hessian evaluations             = 601
Total CPU secs in IPOPT (w/o function evaluations)   =    101.103
Total CPU secs in NLP function evaluations           =      0.694

EXIT: Optimal Solution Found.

但是,它立即运行另一组计算(这从前一个块继续):

 (Previous block) EXIT: Optimal Solution Found.
This is Ipopt version 3.10.1, running with linear solver mumps.

Number of nonzeros in equality constraint Jacobian...:     6670
Number of nonzeros in inequality constraint Jacobian.:    13580
Number of nonzeros in Lagrangian Hessian.............:      196

Total number of variables............................:     3694
                     variables with only lower bounds:     2730
                variables with lower and upper bounds:      964
                     variables with only upper bounds:        0
Total number of equality constraints.................:     1238
Total number of inequality constraints...............:     3612
        inequality constraints with only lower bounds:      160
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:     3452

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0 -2.7146106e+005 9.00e+000 1.66e+000   0.0 0.00e+000    -  0.00e+000 0.00e+000   0
   1 -2.7135545e+005 9.00e+000 3.38e+000   4.8 3.59e+006    -  8.46e-008 2.71e-007f  1
   2 -2.7112865e+005 9.00e+000 7.89e+000   4.7 3.14e+006    -  2.80e-007 6.37e-007f  1
   3 -2.7083702e+005 9.00e+000 8.43e+000   4.2 8.99e+005    -  2.67e-006 2.79e-006f  1

等等......

有没有办法从第一个街区获得解决方案?

它会永远这样重复。

1 个答案:

答案 0 :(得分:0)

它输出多个信息的“块”。

有时,它输出:

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
 600 -2.7877808e+005 1.82e-012 6.71e-003 -11.0 2.75e+000 -10.5 1.00e+000 5.56e-001h  1
 601 -2.7877808e+005 1.82e-012 6.79e-010 -11.0 1.05e+000 -10.0 1.00e+000 1.00e+000f  1
Number of Iterations....: 601
                                   (scaled)                 (unscaled)
Objective...............: -7.4080060189689470e+002  -2.7877808250893821e+005
Dual infeasibility......:  6.7945537380025706e-010   2.5569264627135494e-007
Constraint violation....:  1.8189894035458565e-012   1.8189894035458565e-012
Complementarity.........:  8.6460028294267016e-011   3.2536637848060228e-008
Overall NLP error.......:  6.7945537380025706e-010   2.5569264627135494e-007

Number of objective function evaluations             = 1075
Number of objective gradient evaluations             = 516
Number of equality constraint evaluations            = 1075
Number of inequality constraint evaluations          = 1075
Number of equality constraint Jacobian evaluations   = 604
Number of inequality constraint Jacobian evaluations = 604
Number of Lagrangian Hessian evaluations             = 601
Total CPU secs in IPOPT (w/o function evaluations)   =    101.103
Total CPU secs in NLP function evaluations           =      0.694

EXIT: Optimal Solution Found.

但是,它立即运行另一组计算(这从前一个块继续):

 (Previous block) EXIT: Optimal Solution Found.
This is Ipopt version 3.10.1, running with linear solver mumps.

Number of nonzeros in equality constraint Jacobian...:     6670
Number of nonzeros in inequality constraint Jacobian.:    13580
Number of nonzeros in Lagrangian Hessian.............:      196

Total number of variables............................:     3694
                     variables with only lower bounds:     2730
                variables with lower and upper bounds:      964
                     variables with only upper bounds:        0
Total number of equality constraints.................:     1238
Total number of inequality constraints...............:     3612
        inequality constraints with only lower bounds:      160
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:     3452

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0 -2.7146106e+005 9.00e+000 1.66e+000   0.0 0.00e+000    -  0.00e+000 0.00e+000   0
   1 -2.7135545e+005 9.00e+000 3.38e+000   4.8 3.59e+006    -  8.46e-008 2.71e-007f  1
   2 -2.7112865e+005 9.00e+000 7.89e+000   4.7 3.14e+006    -  2.80e-007 6.37e-007f  1
   3 -2.7083702e+005 9.00e+000 8.43e+000   4.2 8.99e+005    -  2.67e-006 2.79e-006f  1

等等......

有没有办法从第一个街区获得解决方案?

它会永远这样重复。