def _declare_options(cls, options=None): if options is None: options = PySPConfigBlock() safe_declare_common_option(options, "verbose", ap_group=_admm_group_label) ScenarioTreeManagerSolverFactory.register_options( options, options_prefix="subproblem_", setup_argparse=False) return options
def _declare_options(cls, options=None): if options is None: options = PySPConfigBlock() safe_declare_common_option(options, "verbose", ap_group=_admm_group_label) ScenarioTreeManagerSolverFactory.register_options( options, options_prefix="subproblem_", setup_argparse=False) return options
def run_evaluate_xhat_register_options(options=None): if options is None: options = PySPConfigBlock() safe_register_common_option(options, "disable_gc") safe_register_common_option(options, "profile") safe_register_common_option(options, "traceback") safe_register_common_option(options, "scenario_tree_manager") safe_register_common_option(options, "output_scenario_tree_solution") safe_register_common_option(options, "solution_saver_extension") safe_register_common_option(options, "solution_loader_extension") safe_register_unique_option( options, "disable_solution_loader_check", PySPConfigValue( False, domain=bool, description=( "Indicates that no solution loader extension is required to " "run this script, e.g., because the scenario tree manager " "is somehow pre-populated with a solution." ), doc=None, visibility=0), ap_group=_extension_options_group_title) safe_register_unique_option( options, "output_scenario_costs", PySPConfigValue( None, domain=_domain_must_be_str, description=( "A file name where individual scenario costs from the solution " "will be stored. The format is determined from the extension used " "in the filename. Recognized extensions: [.csv, .json, .yaml]" ), doc=None, visibility=0)) ScenarioTreeManagerFactory.register_options(options) ScenarioTreeManagerSolverFactory.register_options(options, options_prefix="subproblem_") return options
def run_evaluate_xhat_register_options(options=None): if options is None: options = PySPConfigBlock() safe_register_common_option(options, "disable_gc") safe_register_common_option(options, "profile") safe_register_common_option(options, "traceback") safe_register_common_option(options, "scenario_tree_manager") safe_register_common_option(options, "output_scenario_tree_solution") safe_register_common_option(options, "solution_saver_extension") safe_register_common_option(options, "solution_loader_extension") safe_register_unique_option( options, "disable_solution_loader_check", PySPConfigValue( False, domain=bool, description=( "Indicates that no solution loader extension is required to " "run this script, e.g., because the scenario tree manager " "is somehow pre-populated with a solution."), doc=None, visibility=0), ap_group=_extension_options_group_title) safe_register_unique_option( options, "output_scenario_costs", PySPConfigValue( None, domain=_domain_must_be_str, description= ("A file name where individual scenario costs from the solution " "will be stored. The format is determined from the extension used " "in the filename. Recognized extensions: [.csv, .json, .yaml]"), doc=None, visibility=0)) ScenarioTreeManagerFactory.register_options(options) ScenarioTreeManagerSolverFactory.register_options( options, options_prefix="subproblem_") return options
has_networkx = True #pragma:nocover except: #pragma:nocover has_networkx = False try: import dill has_dill = True #pragma:nocover except ImportError: #pragma:nocover has_dill = False thisfile = os.path.abspath(__file__) thisdir = os.path.dirname(thisfile) _run_verbose = True _default_test_options = ScenarioTreeManagerSolverFactory.register_options() _default_test_options.solver = 'glpk' _default_test_options.solver_io = 'lp' #_default_test_options.symbolic_solver_labels = True #_default_test_options.keep_solver_files = True #_default_test_options.disable_advanced_preprocessing = True _pyomo_ns_host = '127.0.0.1' _pyomo_ns_port = None _pyomo_ns_process = None _dispatch_srvr_port = None _dispatch_srvr_process = None _taskworker_processes = [] def tearDownModule(): global _pyomo_ns_port global _pyomo_ns_process
has_networkx = True #pragma:nocover except: #pragma:nocover has_networkx = False try: import dill has_dill = True #pragma:nocover except ImportError: #pragma:nocover has_dill = False thisfile = os.path.abspath(__file__) thisdir = os.path.dirname(thisfile) _run_verbose = True _default_test_options = ScenarioTreeManagerSolverFactory.register_options() _default_test_options.solver = 'glpk' _default_test_options.solver_io = 'lp' #_default_test_options.symbolic_solver_labels = True #_default_test_options.keep_solver_files = True #_default_test_options.disable_advanced_preprocessing = True _pyomo_ns_host = '127.0.0.1' _pyomo_ns_port = None _pyomo_ns_process = None _dispatch_srvr_port = None _dispatch_srvr_process = None _taskworker_processes = [] def tearDownModule(): global _pyomo_ns_port global _pyomo_ns_process