コード例 #1
0
ファイル: ef.py プロジェクト: Pyomo/pyomo
                             IPySPSolutionSaverExtension,
                             'solution_writer':
                             ISolutionWriterExtension},
            prog='runef',
            description=(
"""Optimize a stochastic program using the Extensive Form (EF) solver."""
            ))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runef,
                          options,
                          cmd_kwds={'solution_loaders':
                                    extensions['solution_loader_extension'],
                                    'solution_savers':
                                    extensions['solution_saver_extension'],
                                    'solution_writers':
                                    extensions['solution_writer']},
                          error_label="runef: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)

SPSolverFactory.register_solver("ef", EFSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #2
0
    import pyomo.environ

    #
    # Parse command-line options.
    #
    try:
        options = parse_command_line(
            args,
            runddsip_register_options,
            prog='runddsip',
            description=(
                """Optimize a stochastic program using the DDSIP solver."""))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runddsip,
                          options,
                          error_label="runddsip: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)


SPSolverFactory.register_solver("ddsip", DDSIPSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #3
0
ファイル: schuripopt.py プロジェクト: wannasmile/pyomo
    import pyomo.environ

    #
    # Parse command-line options.
    #
    try:
        options = parse_command_line(
            args,
            runschuripopt_register_options,
            prog='runschuripopt',
            description=(
"""Optimize a stochastic program using the SchurIpopt solver."""
            ))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runschuripopt,
                          options,
                          error_label="runschuripopt: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)

SPSolverFactory.register_solver("schuripopt", SchurIpoptSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #4
0
ファイル: sd.py プロジェクト: SemanticBeeng/pyomo
    #
    try:
        options = parse_command_line(
            args,
            runsd_register_options,
            prog='runsd',
            description=(
"""Optimize a stochastic program using the SD solver."""
            ))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runsd,
                          options,
                          error_label="runsd: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)

@pyomo_command('runsd', 'Run the SD solver')
def RunSD_main(args=None):
    return main(args=args)

SPSolverFactory.register_solver("sd", SDSolver)

if __name__ == "__main__":
    sys.exit(RunSD_main())
コード例 #5
0
ファイル: ef.py プロジェクト: CanLi1/pyomo-1
            prog='runef',
            description=
            ("""Optimize a stochastic program using the Extensive Form (EF) solver."""
             ))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runef,
                          options,
                          cmd_kwds={
                              'solution_loaders':
                              extensions['solution_loader_extension'],
                              'solution_savers':
                              extensions['solution_saver_extension'],
                              'solution_writers':
                              extensions['solution_writer']
                          },
                          error_label="runef: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)


SPSolverFactory.register_solver("ef", EFSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #6
0
    #
    # Parse command-line options.
    #
    try:
        options = parse_command_line(
            args,
            runadmm_register_options,
            prog='runadmm',
            description=(
                """Optimize a stochastic program using the Alternating Direction
Method of Multipliers (ADMM) solver."""))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runadmm,
                          options,
                          error_label="runadmm: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)


SPSolverFactory.register_solver("admm", ADMMSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #7
0
ファイル: admm.py プロジェクト: Pyomo/pyomo
    #
    # Parse command-line options.
    #
    try:
        options = parse_command_line(
            args,
            runadmm_register_options,
            prog='runadmm',
            description=(
"""Optimize a stochastic program using the Alternating Direction
Method of Multipliers (ADMM) solver."""
            ))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runadmm,
                          options,
                          error_label="runadmm: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)

SPSolverFactory.register_solver("admm", ADMMSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #8
0
ファイル: schuripopt.py プロジェクト: Pyomo/pyomo
    import pyomo.environ

    #
    # Parse command-line options.
    #
    try:
        options = parse_command_line(
            args,
            runschuripopt_register_options,
            prog='runschuripopt',
            description=(
"""Optimize a stochastic program using the SchurIpopt solver."""
            ))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runschuripopt,
                          options,
                          error_label="runschuripopt: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)

SPSolverFactory.register_solver("schuripopt", SchurIpoptSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #9
0
    import pyomo.environ

    #
    # Parse command-line options.
    #
    try:
        options = parse_command_line(
            args,
            runsd_register_options,
            prog='runsd',
            description=(
                """Optimize a stochastic program using the SD solver."""))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runsd,
                          options,
                          error_label="runsd: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)


SPSolverFactory.register_solver("sd", SDSolver)

if __name__ == "__main__":
    sys.exit(main())
コード例 #10
0
ファイル: ddsip.py プロジェクト: Pyomo/pyomo
    import pyomo.environ

    #
    # Parse command-line options.
    #
    try:
        options = parse_command_line(
            args,
            runddsip_register_options,
            prog='runddsip',
            description=(
"""Optimize a stochastic program using the DDSIP solver."""
            ))

    except SystemExit as _exc:
        # the parser throws a system exit if "-h" is specified
        # - catch it to exit gracefully.
        return _exc.code

    return launch_command(runddsip,
                          options,
                          error_label="runddsip: ",
                          disable_gc=options.disable_gc,
                          profile_count=options.profile,
                          traceback=options.traceback)

SPSolverFactory.register_solver("ddsip", DDSIPSolver)

if __name__ == "__main__":
    sys.exit(main())