Ejemplo n.º 1
0
if options.tol is not None:
    opts_solve['tolerance'] = options.tol

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

multiple_problems = len(args) > 1

if not options.verbose:
    log.info(hdr)
    log.info('-'*len(hdr))

for probname in args:

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

    # isqp() should be implemented in the near future.
    #if not qp.isqp():
    #    log.info('Problem %s is not a quadratic program\n' % probname)
    #    qp.close()
    #    continue

    # Pass problem to RegQP.
    regqp = Solver(qp,
                   scale=not options.no_scale,
                   verbose=options.verbose,
                   **opts_init)

    regqp.solve(PredictorCorrector=not options.longstep,
Ejemplo n.º 2
0
opts_solve = {}
if options.maxiter is not None:
    opts_solve['itermax'] = options.maxiter
if options.tol is not None:
    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()
    qp = SlackFramework(probname)
    t_setup = cputime() - t_setup

    # isqp() should be implemented in the near future.
    #if not qp.isqp():
    #    sys.stderr.write('Problem %s is not a linear program\n' % probname)
    #    qp.close()
    #    continue

    # Pass problem to RegQP.
    regqp = RegQPInteriorPointSolver(qp,
                                     scale=not options.no_scale,
                                     verbose=options.verbose,
                                     **opts_init)
    
    regqp.solve(PredictorCorrector=not options.longstep,
Ejemplo n.º 3
0
opts_solve = {}
if options.maxiter is not None:
    opts_solve['itermax'] = options.maxiter
if options.tol is not None:
    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)
Ejemplo n.º 4
0
opts_solve = {}
if options.maxiter is not None:
    opts_solve['itermax'] = options.maxiter
if options.tol is not None:
    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)