GurobiClient¶
- class GurobiClient¶
ベースクラス:
BaseClientClient for the Gurobi Optimizer, a mathematical programming solver. The client loads the Gurobi library of the machine, so it sends no request over the network and it needs a license.
Methods
Attributes
Degrees of the polynomial that the solver accepts.
Parameters that the client sends with every request.
Path of the file that receives a copy of the request, or
Noneto write none.Path of the file that receives a copy of the response, or
Noneto write none.- class Parameters¶
Parameters that the client sends with every request.
- __init__(*args, **kwargs)¶
- property agg_fill¶
- property aggregate¶
- property bar_conv_tol¶
- property bar_correctors¶
- property bar_homogeneous¶
- property bar_iter_limit¶
- property bar_order¶
- property bar_qcp_conv_tol¶
- property best_bd_stop¶
- property best_obj_stop¶
- property bqp_cuts¶
- property branch_dir¶
- property clique_cuts¶
- property cloud_access_id¶
- property cloud_host¶
- property cloud_pool¶
- property cloud_secret_key¶
- property compute_server¶
- property concurrent_jobs¶
- property concurrent_method¶
- property concurrent_mip¶
- property cover_cuts¶
- property crossover¶
- property crossover_basis¶
- property cs_app_name¶
- property cs_auth_token¶
- property cs_batch_mode¶
- property cs_client_log¶
- property cs_group¶
- property cs_idle_timeout¶
- property cs_manager¶
- property cs_priority¶
- property cs_queue_timeout¶
- property cs_router¶
- property csapi_access_id¶
- property csapi_secret¶
- property cstls_insecure¶
- property cut_agg_passes¶
- property cut_passes¶
- property cutoff¶
- property cuts¶
- property degen_moves¶
- property disconnected¶
- property display_interval¶
- property distributed_mip_jobs¶
- property dual_implied_cuts¶
- property dual_reductions¶
- property feas_relax_big_m¶
- property feasibility_tol¶
- property flow_cover_cuts¶
- property flow_path_cuts¶
- property func_max_val¶
- property func_nonlinear¶
- property func_piece_error¶
- property func_piece_length¶
- property func_piece_ratio¶
- property func_pieces¶
- property gomory_passes¶
- property gub_cover_cuts¶
- property heuristics¶
- property ignore_names¶
- property iis_method¶
- property implied_cuts¶
- property improve_start_gap¶
- property improve_start_nodes¶
- property improve_start_time¶
- property inf_proof_cuts¶
- property inf_unbd_info¶
- property int_feas_tol¶
- property integrality_focus¶
- property iteration_limit¶
- property job_id¶
- property json_sol_detail¶
- property lazy_constraints¶
- property license_id¶
- property lift_project_cuts¶
- property log_file¶
- property log_to_console¶
- property lp_warm_start¶
- property markowitz_tol¶
- property mem_limit¶
- property method¶
- property min_rel_nodes¶
- property mip_focus¶
- property mip_gap¶
- property mip_gap_abs¶
- property mip_sep_cuts¶
- property miqcp_method¶
- property mir_cuts¶
- property mixing_cuts¶
- property mod_k_cuts¶
- property multi_obj_method¶
- property multi_obj_pre¶
- property network_alg¶
- property network_cuts¶
- property nlp_heur¶
- property no_rel_heur_time¶
- property no_rel_heur_work¶
- property no_rel_heuristic¶
- property node_limit¶
- property node_method¶
- property nodefile_dir¶
- property nodefile_start¶
- property non_convex¶
- property norm_adjust¶
- property numeric_focus¶
- property obbt¶
- property obj_number¶
- property obj_scale¶
- property optimality_tol¶
- property output_flag¶
- property partition_place¶
- property perturb_value¶
- property pool_gap¶
- property pool_gap_abs¶
- property pool_search_mode¶
- property pool_solutions¶
- property pre_crush¶
- property pre_dep_row¶
- property pre_dual¶
- property pre_miqcp_form¶
- property pre_passes¶
- property pre_q_linearize¶
- property pre_sparsify¶
- property presolve¶
- property proj_implied_cuts¶
- property psd_cuts¶
- property psd_tol¶
- property pump_passes¶
- property qcp_dual¶
- property quad¶
- property record¶
- property relax_lift_cuts¶
- property result_file¶
- property rins¶
- property rlt_cuts¶
- property scale_flag¶
- property scenario_number¶
- property seed¶
- property server_password¶
- property server_timeout¶
- property sift_method¶
- property sifting¶
- property simplex_pricing¶
- property soft_mem_limit¶
- property sol_files¶
- property solution_limit¶
- property solution_number¶
- property solution_target¶
- property start_node_limit¶
- property start_number¶
- property strong_cg_cuts¶
- property sub_mip_cuts¶
- property sub_mip_nodes¶
- property symmetry¶
- property thread_limit¶
- property threads¶
- property time_limit¶
- property token_server¶
- property ts_port¶
- property tune_cleanup¶
- property tune_criterion¶
- property tune_dynamic_jobs¶
- property tune_jobs¶
- property tune_metric¶
- property tune_output¶
- property tune_results¶
- property tune_target_mip_gap¶
- property tune_target_time¶
- property tune_time_limit¶
- property tune_trials¶
- property update_mode¶
- property username¶
- property var_branch¶
- property wls_access_id¶
- property wls_config¶
- property wls_proxy¶
- property wls_secret¶
- property wls_token¶
- property wls_token_duration¶
- property wls_token_refresh¶
- property work_limit¶
- property worker_password¶
- property worker_pool¶
- property zero_half_cuts¶
- property zero_obj_nodes¶
- class Result¶
Raw response that the solver returned.
- class OptimizationStatusCode¶
ベースクラス:
Enum- classmethod __contains__(value)¶
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls's members. 3) value is a pseudo-member (flags)
- classmethod __getitem__(name)¶
Return the member matching name.
- classmethod __iter__()¶
Return members in definition order.
- classmethod __len__()¶
Return the number of members (no aliases)
- Cutoff = 6¶
- InfOrUnbd = 4¶
- Infeasible = 3¶
- Inprogress = 14¶
- Interrupted = 11¶
- IterationLimit = 7¶
- Loaded = 1¶
- MemLimit = 17¶
- NodeLimit = 8¶
- Numeric = 12¶
- Optimal = 2¶
- SolutionLimit = 10¶
- Suboptimal = 13¶
- TimeLimit = 9¶
- Unbounded = 5¶
- Unknown = 0¶
- UserObjLimit = 15¶
- WorkLimit = 16¶
- __members__ = mappingproxy({'Unknown': OptimizationStatusCode.Unknown, 'Loaded': OptimizationStatusCode.Loaded, 'Optimal': OptimizationStatusCode.Optimal, 'Infeasible': OptimizationStatusCode.Infeasible, 'InfOrUnbd': OptimizationStatusCode.InfOrUnbd, 'Unbounded': OptimizationStatusCode.Unbounded, 'Cutoff': OptimizationStatusCode.Cutoff, 'IterationLimit': OptimizationStatusCode.IterationLimit, 'NodeLimit': OptimizationStatusCode.NodeLimit, 'TimeLimit': OptimizationStatusCode.TimeLimit, 'SolutionLimit': OptimizationStatusCode.SolutionLimit, 'Interrupted': OptimizationStatusCode.Interrupted, 'Numeric': OptimizationStatusCode.Numeric, 'Suboptimal': OptimizationStatusCode.Suboptimal, 'Inprogress': OptimizationStatusCode.Inprogress, 'UserObjLimit': OptimizationStatusCode.UserObjLimit, 'WorkLimit': OptimizationStatusCode.WorkLimit, 'MemLimit': OptimizationStatusCode.MemLimit})¶
- __name__ = 'OptimizationStatusCode'¶
- __nb_enum__ = <capsule object NULL>¶
- __qualname__ = 'GurobiClient.Result.OptimizationStatusCode'¶
- __init__(*args, **kwargs)¶
- property bar_iter_count¶
- property bound_vio¶
- property constr_vio¶
- property farkas_proof¶
- property int_vio¶
- property iter_count¶
- property mip_gap¶
- property node_count¶
- property obj_bound¶
- property obj_bound_c¶
- property obj_val¶
- property pool_obj_bound¶
- property pool_obj_val¶
- property runtime¶
- property sol_count¶
- property status¶
- property time_stamps¶
- property var_names¶
- property x¶
- property xn¶
- solve(self, objective: Poly | Matrix, dry_run: Literal[False] = False) Result¶
- solve(
- self,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[False] = False,
- solve(
- self,
- objective: Poly | Matrix,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[False] = False,
- solve(self, objective: Poly | Matrix, dry_run: Literal[True]) None
- solve(self, constraint: Constraint | ConstraintList, dry_run: Literal[True]) None
- solve(
- self,
- objective: Poly | Matrix,
- constraint: Constraint | ConstraintList,
- dry_run: Literal[True],
Send the objective function and the constraints to the solver.
This method takes the polynomial that the solver accepts, so it runs no conversion of the model. Use
solve()to solve a model that needs a conversion. It returns the raw response of the solver.Overload 1.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.
- Returns:
amplify.GurobiClient.Result:
Overload 2.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.
- Returns:
amplify.GurobiClient.Result:
Overload 3.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[False]): When
True, ask the service to check the request, and returnNone. Defaults toFalse.
- Returns:
amplify.GurobiClient.Result:
Overload 4.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.
Overload 5.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.
Overload 6.
- Args:
objective (amplify.Poly | amplify.Matrix): The objective function that the solver minimizes.
constraint (amplify.Constraint | amplify.ConstraintList): The constraints that the solution must satisfy.
dry_run (typing.Literal[True]): When
True, ask the service to check the request, and returnNone.
- tune(self, objective: Poly | Matrix) None¶
- tune(self, constraint: Constraint | ConstraintList) None
- tune(self, objective: Poly | Matrix, constraint: Constraint | ConstraintList) None
tune
Overload 1.
- Args:
objective (amplify.Poly | amplify.Matrix)
Overload 2.
- Args:
constraint (amplify.Constraint | amplify.ConstraintList)
Overload 3.
- Args:
objective (amplify.Poly | amplify.Matrix)
constraint (amplify.Constraint | amplify.ConstraintList)
- property acceptable_degrees¶
Degrees of the polynomial that the solver accepts.
solve()reads it to decide the conversion of the model.- 戻り値の型:
- property library_path¶
- property parameters¶
Parameters that the client sends with every request.
- 戻り値の型:
- property version¶