Пример #1
0
    opts_solve['tolerance'] = options.tol

# Set printing standards for arrays.
numpy.set_printoptions(precision=3, linewidth=80, threshold=10, edgeitems=3)

if not options.verbose:
    sys.stderr.write(hdr + '\n' + '-'*len(hdr) + '\n')

for probname in args:

    t_setup = cputime()
    lp = SlackFramework(probname)
    t_setup = cputime() - t_setup

    islp = True
    if not lp.islp():
        sys.stderr.write('Problem %s is not a linear program\n' % probname)
        islp = False
        lp.close()
        continue

    # Pass problem to RegLP.
    reglp = RegLPInteriorPointSolver(lp,
                                     scale=not options.no_scale,
                                     stabilize=not options.no_stabilize,
                                     verbose=options.verbose,
                                     **opts_init)

    reglp.solve(PredictorCorrector=not options.longstep,
                check_infeasible=not options.assume_feasible,
                **opts_solve)
Пример #2
0
    opts_solve['tolerance'] = options.tol

# Set printing standards for arrays.
numpy.set_printoptions(precision=3, linewidth=80, threshold=10, edgeitems=3)

if not options.verbose:
    sys.stderr.write(hdr + '\n' + '-' * len(hdr) + '\n')

for probname in args:

    t_setup = cputime()
    lp = SlackFramework(probname)
    t_setup = cputime() - t_setup

    islp = True
    if not lp.islp():
        sys.stderr.write('Problem %s is not a linear program\n' % probname)
        islp = False
        lp.close()
        continue

    # Pass problem to RegLP.
    reglp = RegLPInteriorPointSolver(lp,
                                     scale=not options.no_scale,
                                     stabilize=not options.no_stabilize,
                                     verbose=options.verbose,
                                     **opts_init)

    reglp.solve(PredictorCorrector=not options.longstep,
                check_infeasible=not options.assume_feasible,
                **opts_solve)