cplex

CPLEX OPL and Excel VBA Integration

为君一笑 提交于 2020-01-03 06:59:31
问题 I have to run the same optimization model many times with different parameters for research purposes. (I am trying to observe the results I'll get off a single model when I increase a parameter) The easiest way for me to do is to use Excel Macros as it would take me forever to solve each model one by one and record the results. However I have no idea how I will make VBA call the CPLEX Solver and read all my parameters from my excel sheet and write the results back there. If I am to put what I

Error while installing CPLEX 12.6 for Python

人盡茶涼 提交于 2019-12-25 12:03:11
问题 I am trying to install CPLEX for python from the setup.py file existing in ILOG directory. I am working on windows 8 32bit and python 2.7. I am using this command for installing: python setup.py install But I get this error, error: could not create 'build': access is denied. Is it due to the permission? How can I fix this? thanks 回答1: I have no idea about CPLEX but processes in windows8 usually don't get write access to certain directories. You could try to make your call "python setup.py

Error while installing CPLEX 12.6 for Python

依然范特西╮ 提交于 2019-12-25 12:03:08
问题 I am trying to install CPLEX for python from the setup.py file existing in ILOG directory. I am working on windows 8 32bit and python 2.7. I am using this command for installing: python setup.py install But I get this error, error: could not create 'build': access is denied. Is it due to the permission? How can I fix this? thanks 回答1: I have no idea about CPLEX but processes in windows8 usually don't get write access to certain directories. You could try to make your call "python setup.py

Decomposition of matrices for CPLEX and machine learning application

房东的猫 提交于 2019-12-25 09:19:20
问题 I am dealing with big matrices and time to time my code ends with 'killed:9' message in my terminal. I'm working on Mac OSx. A wise programmer tells me the problem in my code is liked to the stored matrix I am dealing with. nn = 35000 dd = 35 XX = np.random.rand(nn,dd) XX = XX.dot(XX.T) #it should be faster than np.dot(XX,XX.T) yy = np.random.rand(nn,1) XX = np.multiply(XX,yy.T) I have to store this huge matrix XX, my guess: I split the matrix with upp = np.triu(XX) Do I actually save space

Errors while installing Rcplex in R on MAC

喜你入骨 提交于 2019-12-24 20:11:57
问题 I am trying to install Rcplex on MAC but I am running into very strange error. I ran the following command on terminal: R CMD INSTALL --configure-args=" \ --with-cplex-lib='/Applications/CPLEX_Studio_Community129/cplex/lib/x86-64_osx/static_pic/' \ --with-cplex-include='/Applications/CPLEX_Studio_Community129/cplex/include/' \ --with-cplex-link='-lcplex -m64 -lm -pthread' \ --with-cplex-check='/Applications/CPLEX_Studio_Community129/cplex/examples/src/c' \ --with-cplex-cflags='-m64 -fPIC'" \

trying to read quadratic program in cplex, get error

ⅰ亾dé卋堺 提交于 2019-12-24 14:53:09
问题 I am trying to load a CPLEX LP file in to CPLEX using the "read" command. I believe that in this problem, I have a set of constraints that are quadratic. But, from what I understand CPLEX will still attempt to solve quadratic programming problems. However, when I try to read it in, I get this error: CPLEX Error 1437: Line 284: Illegal quadratic constraint sense. Is there something special I need to do to read in a quadratic programming problem? NOTE: I am able to load this LP file in to scip

“Symbols not found for Architecture x86_64” for a MEX file that uses the CPLEX API in C

左心房为你撑大大i 提交于 2019-12-24 14:50:17
问题 I'm currently writing a MEX file in MATLAB that uses the CPLEX API in C to solve linear programming problems. Unfortunately, I run into a "symbol(s) not found for architecture x86_64" problem when I attempt to compile and I have no idea of how to solve it. Some basic information: I can compile yprime.c and other MEX files that do not use the CPLEX API I am using MATLAB 2011b on Mac OSX 10.7.2 I am using the GCC 4.2 package included in XCode 4.2. I already applied the XCode 4.2 Patch for

Memory optimization while using CPLEX library in Java

本秂侑毒 提交于 2019-12-24 14:24:39
问题 I am using IBM CPLEX library for an optimization problem in Java. Since main memory was not enough for the application I found a property of CPLEX : "Memory emphasis: letting the optimizer use disk for storage". Default value for Memory Emphasis is 0. How can I change this property in Java? for (int i = 0; i < GreenOverlayGlobals.numNodes; i++) { for (int j = 0; j < GreenOverlayGlobals.numNodes; j++) { IloLinearNumExpr expr2 = cplex.linearNumExpr(); for (int p = 0; p < GreenOverlayGlobals

CPLEX - getting minimum of a set of variables over a condition

非 Y 不嫁゛ 提交于 2019-12-24 14:16:59
问题 I have to solve the following problem using CPLEX Java API: I need to write a condition that will return a minimum of a set of integer variables (let's say x[i], i=1,2,...,n) but considering only the positive ones. In other words: min{x[i] | x[i]>0} I know that CPLEX has the minimum function, but the problem is how to pass it the mentioned condition. 回答1: Create a single continuous variable. Add constraints that this new variable must be <= all of the integer variables. Then just maximise the

ImportError: No module named 'cplex' Python on Linux

蓝咒 提交于 2019-12-24 06:38:34
问题 I am trying to run python scripts on a HPC machine (RedHatEntrepriseServer). CPLEX module is already installed by adminastrators but I still have this error in importing cplex module in python. ImportError: No module named 'cplex' I know it is common error and I found that I may need to update PYTHONPATH variable with cplex home directory, but I can't find this home directory. Does anyone have an idea or suggestion to solve this problem?! Many thanks! 回答1: As mentioned in the comments,