idol
v0.8.0-alpha
우상은 수학적 최적화 및 복잡한 의사 결정을위한 C ++ 라이브러리입니다.
점점 더 어려운 문제를 해결하기 위해 새로운 알고리즘을 쉽게 구축 할 수 있도록 설계되었습니다. 혼합 integer 선형 프로그래밍 (MILP), 2 차 제한된 문제 (MIQCQP 및 MIQP), BILEVEL 문제 (BO), 강력한 최적화 문제 (RO 및 ARO) 등 광범위한 최적화 문제를 해결하는 데 사용할 수있는 다목적이고 강력한 도구입니다.
온라인 문서를 방문하십시오.
연구 프로젝트 중 하나에서 우상을 선택하고 몇 가지 문제를 겪고 있다면 Lefebvre (at) uni-trier.de로 문의하십시오.
우상을 사용하여 분기 및 가격 알고리즘을 구현하는 것이 얼마나 쉬운 지보십시오.
const auto [model, decomposition] = create_model(); // Creates the model with an annotation for automatic decomposition
const auto sub_problem_specifications =
DantzigWolfe::SubProblem ()
.add_optimizer(Gurobi()); // Each sub-problem will be solved by Gurobi
const auto column_generation =
DantzigWolfeDecomposition (decomposition)
.with_master_optimizer(Gurobi::ContinuousRelaxation()) // The master problem will be solved by Gurobi
.with_default_sub_problem_spec(sub_problem_specifications);
const auto branch_and_bound =
BranchAndBound ()
.with_node_selection_rule(BestBound()) // Nodes will be selected by the "best-bound" rule
.with_branching_rule(MostInfeasible()) // Variables will be selected by the "most-fractional" rule
.with_log_level(Info, Blue);
const auto branch_and_price = branch_and_bound + column_generation; // Embed the column generation in the Branch-and-Bound algorithm
model.use(branch_and_price);
model.optimize();여기서 Idol은 외부 솔버 코인 또는/MIB를 사용하여 정수 하위 레벨로 이벽 최적화 문제를 해결합니다.
/*
This example is taken from "The Mixed Integer Linear Bilevel Programming Problem" (Moore and Bard, 1990).
min -1 x + -10 y
s.t.
y in argmin { y :
-25 x + 20 y <= 30,
1 x + 2 y <= 10,
2 x + -1 y <= 15,
2 x + 10 y >= 15,
y >= 0 and integer.
}
x >= 0 and integer.
*/
Env env;
// Define High Point Relaxation
Model high_point_relaxation (env);
auto x = high_point_relaxation.add_var( 0 , Inf, Integer, " x " );
auto y = high_point_relaxation.add_var( 0 , Inf, Integer, " y " );
high_point_relaxation.set_obj_expr(-x - 10 * y);
auto follower_c1 = high_point_relaxation.add_ctr(- 25 * x + 20 * y <= 30 );
auto follower_c2 = high_point_relaxation.add_ctr(x + 2 * y <= 10 );
auto follower_c3 = high_point_relaxation.add_ctr( 2 * x - y <= 15 );
auto follower_c4 = high_point_relaxation.add_ctr( 2 * x + 10 * y >= 15 );
// Prepare bilevel description
Bilevel::LowerLevelDescription description (env);
description.set_follower_obj_expr(y);
description.set_follower_var(y);
description.set_follower_ctr(follower_c1);
description.set_follower_ctr(follower_c2);
description.set_follower_ctr(follower_c3);
description.set_follower_ctr(follower_c4);
// Use coin-or/MibS as external solver
high_point_relaxation.use(Bilevel::MibS(description));
// Optimize and print solution
high_point_relaxation.optimize();
std::cout << high_point_relaxation.get_status() << std::endl;
std::cout << high_point_relaxation.get_reason() << std::endl;
std::cout << save_primal(high_point_relaxation) << std::endl;알고리즘의 진행 상황을 모니터링하기 위해 우상을 루트와 인터페이스 할 수 있습니다. 예를 들어, 다음은 양계인 인스턴스에 대한 MIB 모니터링의 스크린 샷입니다.
아이돌
이는 Dolan, E., Moré, J. 벤치마킹 최적화 소프트웨어에 따라 성능 프로파일로 계산 된 성능 프로파일입니다. 수학. 프로그램. 91, 201–213 (2002) https://doi.org/10.1007/S101070100263.
버전 관리는 Semantic Versionning 2.0.0을 준수합니다.