cplex

Is z3 the most efficient solver for quantifier-free integer propositional logic? [closed]

北城以北 提交于 2019-12-23 15:44:34
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 12 months ago . Sorry that this question is subjective, but given that the Stack Overflow has the largest Z3 user base, I want to give it a try. I have a big constraint satisfaction problem that consists of many integer propositional logic formulas and a few first order logic formulas that

Cplex library gcc compilation link error

老子叫甜甜 提交于 2019-12-21 06:40:06
问题 gcc -I/opt/cplex-studio-125/cplex/include -lcplex -L/opt/cplex-studio-125/cplex/lib/x86-64_sles10_4.1/static_pic mipex1.c I'm trying to compile an example from cplex. -I option is fine. The -L option seems to be corrupt, since it can't find the function names. Where is the error? In the specifiec link there is a libcplex.a . /tmp/ccf5sKky.o: In function `main': mipex1.c:(.text+0x9f): undefined reference to `CPXopenCPLEX' mipex1.c:(.text+0xee): undefined reference to `CPXgeterrorstring' mipex1

Maximizing linear objective subject to quadratic constraints

冷暖自知 提交于 2019-12-20 04:37:05
问题 I have a programming formulation from a paper and want to give it a tool for solving specific problems. The authors stated it as an linear programming (LP) instance, however I am not sure. Formulation is somewhat like as follows: max x1+x2+x3... s.t. x1.x3+x4.x5 <= 10 x2.x5+x3.x7+x1.x9 <=10 ... I tried to program it through cplexqcp function (due to quadratic constraints, however constraints do not include any x_i^2 variable). However I receive CPLEX Error 5002: Q in %s is not positive semi

UnsatisfiedLinkError, despite setting Djava.library.path variable

孤街醉人 提交于 2019-12-20 04:19:46
问题 I am trying to integrate IBM's CPLEX library with my java application. For now, i'm just trying to create an IloCplex object. I added Cplex.jar, and it compiles fine, but when I run this: public class cplexTest{ public static void main(String[] args){ try{ IloCplex cplex = new IloCplex(); }catch (Exception e){ e.printStackTrace(); } } Cplex prints this message before throwing an exception: java.lang.UnsatisfiedLinkError: no cplex124 in java.library.path java.library.path must point to the

What is wrong with this forall -statement in CPLEX?

柔情痞子 提交于 2019-12-19 11:58:09
问题 I am trying to answer here but err: forall(t in 0..4){ a[t]<=z[t]; -a[t]<=z[t]; x[t+1]==x[t]+v[t]; v[t+1]==v[t]+a[t]; } 回答1: The recursive equation enters into un-initialized interval hence index out of exeption. You can avoid this bug by tweaking: initialize not-needed valuations and assign them to zero. This creates some overhead but simplifies the logic, cannot think about any simpler way to do this. 来源: https://stackoverflow.com/questions/13291906/what-is-wrong-with-this-forall-statement

Passing CPLEX Parameters to CVXPY

空扰寡人 提交于 2019-12-18 09:39:06
问题 How do i pass tolerances and other parameters through CVXPY when using the CPLEX solver? from cvxpy import Problem, Minimize from cvxpy.settings import CPLEX costs = ... constraints = ... prob = Problem(Minimize(costs), constraints) prob.solve(solver=CPLEX, ...) I see a page of CPLEX Parameters though it is unclear which ones apply to my quadratic problem. Also, the CVXPY documentation has pass through options for other solvers but not CPLEX. 回答1: This will change in the future (see this pull

IloEnv is not working

人盡茶涼 提交于 2019-12-14 03:27:29
问题 I am using Java to solve a series of problems with Cplex. My main goad is to optimise different stances of a model with modified variables and constraints ( and no, I can't modify the main model every time). To do so, I want to use IloEnv, but, this command: IloEnv env; is not recognised by Cplex. It gives me the "IloEnv cannot be resolved to a type" error. Any idea? 回答1: IloEnv is only available in the C++ API, but not the Java API (where the memory management details are hidden). With the

0-1 knapsack using python cplex

别来无恙 提交于 2019-12-13 19:24:37
问题 I'm trying to solve a slight modification of a 0-1 knapsack problem, where each item is a vector of values from which one value is chosen, instead of a scalar using Python Cplex. This is a variant of a Mixed integer problem. I wrote a IBM OPL solution to this problem, but unable to figure out how to solve it using Python Cplex. My solution using IBM OPL is: int Capacity = 100; // Capacity of the knapsack int k = 2; // Number of items int n = 5; // Number of values range values = 1..n; range

Set limitation on gap tolerance and run time [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-13 09:25:03
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 months ago . I have two questions: In IBM ILOG CPLEX, I wrote an OPL project. Because the code works with large scale data, it takes a lot of time to solve. What is the code for limitation the gap tolerance of MIP Problem and limitation the time? I want to have a CSV file containing my

error: C compiler cannot create executables

核能气质少年 提交于 2019-12-13 04:39:02
问题 I am trying to install Rcplex in R on a macbook and I'm following the instruction at this link http://jrzubizarreta.com/INSTALL. On terminal, in the folder where the unzipped Rcplex directory is, I typed cd /Library/Frameworks/R.framework/Versions/3.4/Resources/library R CMD INSTALL --configure-args="PKG_CFLAGS='-m64 -fPIC' PKG_CPPFLAGS=- I/Applications/CPLEX_Studio_Community129/cplex/include PKG_LIBS='- l/Applications/CPLEX_Studio_Community129/cplex/examples/x86-64_osx/static_pic -m64 -lm