I am using Pulp modeler with python to solve an integer programming problem. I am using IBM CPLEX as a solver. When I run my Python program, I have a lot of output messages in the console like:
The CPLEX Optimizers will solve problems up to 1000 variables and 1000 constraints. IBM ILOG CPLEX Optimization Studio Preview Edition good for 48 more days ...
I look for a solution on the internet and I fix the issue. So I disable the display by writing msg=0
as follows:
from coinor.pulp import *
# ...
prob = LpProblem("MyProblem", LpMaximize)
# ...
prob.solve(CPLEX(msg=0))
Yesterday I removed some softwares from my computer and when I tried to run my Python program, Python says cannot run cplex.exe
. I find out that something went wrong with my environment variables (all environment variable in path are erased). So I re-installed the CPLEX solver and I run exactly the same program but I still have the output messages now even with msg=0
.
What do you think is the problem? And how can I disable the output messages?
CPLEX can handle 30 million variables. The more interesting question will be: does your machine have enough memory for that. CPLEX needs to store lower, upper bounds and objective function coefficients as double precision values for each variable.
To solve such linear programming problems, CPLEX implements optimizers based on the simplex algorithms (both primal and dual simplex) as well as primal-dual logarithmic barrier algorithms and a sifting algorithm.
The CPLEX solver from IBM ILOG is a high performance solver for Linear Programming (LP), Mixed Integer Programming (MIP) and Quadratic Programming (QP/QCP/MIQP/MIQCP) problems. A detailed list of all features supported by CPLEX can be found on our Solvers page.
CPLEX is a tool for solving linear optimization problems, commonly referred to as Linear Programming (LP) problems.
Maybe simply redirect stdout of the command to nul? cplex.exe ..your args.. > nul
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With