Introduction To Problem Solving in Cplex
Introduction To Problem Solving in Cplex
Introduction To Problem Solving in Cplex
in CPLEX
Operations Research Lab
Department of Industrial & Systems
Engineering
IIT Kharagpur
by
Dr. Krishna Kumar
Step 1
Open the Cplex IDE
Step 2
Create a new workspace (click “OK” on the dialog box)
Step 3
Create a new OPL project (File>new>new OPL project)
Cplex windows
Alternative to create configuration and
model file
Linear Programming Problem
x1 4
2 x2 12 “can be atmost”
constraints
3 x1 2 x2 18
“Must be atleast”
3 x1 5 x2 15 constraint
x1 0
Non-Negativity
x2 0 Constraints
Write the code
How to run?
Right click on “Configuration 1”and press “Run this”
Check for errors
Results
Exercise problem
Maximize Z=2x1 4 x2 3x3
s.t.
x1 3 x2 2 x3 30
x1 x2 x3 24
3 x1 5 x2 3 x3 60
x1 , x2 , x3 0