没有合适的资源?快使用搜索试试~ 我知道了~
首页Cplex c++入门讲解.pdf
资源详情
资源评论
资源推荐

Tutorial on CPLEX
Linear Programming
Combinatorial Problem Solving (CPS)
Enric Rodr´ıguez-Carbonell
Apri l 18, 2017

LP with CPLEX
2 / 31
■ Among other things, CPLEX allows one to deal with:
◆ Real linear progs
(all vars are in
R)
min c
T
x
A
1
x ≤ b
1
A
2
x = b
2
A
3
x ≥ b
3
x ∈ R
n
◆ Mixed integer linear progs
(some vars are in
Z)
min c
T
x
A
1
x ≤ b
1
A
2
x = b
2
A
3
x ≥ b
3
∀i ∈ I : x
i
∈ Z
∀i 6∈ I : x
i
∈ R

CPLEX Toolkit
3 / 31
■ CPLEX allows one to work in several way s. CPLEX is...
◆ An IDE that us e s the OPL modeling language
◆ An interactive optimizer that reads MPS/LP input
◆ A callable library in several languages
■ Java
■ C
■
C++ (Concert Technology)
■ ...

Concert Technology
4 / 31
■ Two kind s of objects:
◆
Modeling objects for de fining the optimization problem
(constraints , objective function, etc.)
They are grou ped into an
IloModel objec t representing t h e complete
optimization problem (recall: here,
model = prob lem).
◆ Solving objects for solving problems represe n ted by modeling objects.
An IloCplex object reads a model, extracts its data, solves th e
problem and answers queries on solution.

Creating the Environment: IloEnv
5 / 31
■ The class IloEnv constructs a CPLEX environment .
■ The en v ironmen t is the first object created in an application.
■ To create an environment named
env, you do this:
IloEnv env ;
■ The en v ironmen t object needs to be available to t h e con structor of all
other Conc ert Technology classes
■
IloEnv is a handle class: variable env is a pointer to an implementation
object, which is created at t h e same time
■ Before terminating destroy th e implementation object with
env . end ();
for just ONE of its IloEnv handles
剩余30页未读,继续阅读

















安全验证
文档复制为VIP权益,开通VIP直接复制

评论2