OR-Exchange - latest questionshttp://www.or-exchange.com/feeds/rss?Ask and answer questions.enWed, 01 Apr 2015 01:50:11 -0400error of calling cplex.dll from C# (4.0) .NET Visual Studio 2013 on win 7.http://www.or-exchange.com/questions/11839/error-of-calling-cplexdll-from-c-40-net-visual-studio-2013-on-win-7<p>I am trying to call CPLEX (a mathimatical optimizer) from .NET Visual Studio 2013 on win 7. </p>
<p>I have installed optimization.framework. </p>
<p>I have added </p>
<pre><code> using Optimization.Solver.Cplex;
</code></pre>
<p>in the code. </p>
<p>I try to run the example at: </p>
<pre><code><a href="http://www-01.ibm.com/support/docview.wss?uid=swg21400073&aid=1">http://www-01.ibm.com/support/docview.wss?uid=swg21400073&aid=1</a>
</code></pre>
<p>I commented out </p>
<pre><code>//using ILOG.Concert;
//using ILOG.CPLEX;
</code></pre>
<p>It can be built. But, I got error: </p>
<pre><code> Unable to load DLL 'cplex100.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
</code></pre>
<p>I change the DLL to cplex.dll but the same error.
In </p>
<pre><code> using Optimization.Solver
</code></pre>
<p>when I typed ctrl+space , I can see that it includes many solvers, including CPLEX. </p>
<p>Why i got this error. </p>
<p>thanks </p>usaTue, 31 Mar 2015 18:30:28 -0400http://www.or-exchange.com/questions/11839/error-of-calling-cplexdll-from-c-40-net-visual-studio-2013-on-win-7c#.netvisual-studio-2013cplexmathematical-optimizationHow to linearize/convexify this constraint?http://www.or-exchange.com/questions/11843/how-to-linearizeconvexify-this-constraint<p>I have one optimization problem in the form:</p>
<p>How can I make constraints C3 and C4 linear or convex?</p>
<p>\[Maximize\hspace{3mm} \beta\]</p>
<p>\[ \text{subject to}\]</p>
<p>\[C1: \sum_{k\in\mathcal{U}_b}\|f_k\|_2^2\le P_b,\hspace{2mm}b\in\mathcal{B}\hspace{2mm}\forall k\in\mathcal{U}\]</p>
<p>\[C2: \text{Imag}(h_{b_k,k}f_k)=0;\hspace{2mm}\forall k\in\mathcal{U}\]</p>
<p>\[C3: A\beta\le{\rm{log}}_2(1+\gamma_k)\hspace{2mm}\forall k\in\mathcal{U}\]</p>
<p>\[C4: C\beta\ge{\rm{log}}_2(1+\gamma_k)\hspace{2mm}\forall k\in\mathcal{U}\]</p>
<p>where \(\gamma_k\) is given by</p>
<p>\[\gamma_k=\frac{|h_{b_k,k}f_k|^2}{1+\sum_{i=1,i\neq k}^K|h_{b_i,k}f_i|^2}\]</p>
<p>Here \(\mathcal{U}=\{1,2,\cdots,K\}\), \(\mathcal{U}_b\) is a subset of \(\mathcal{U}\)</p>
<p>\(\mathcal{B}=\{1,2,\cdots,B\}\) and \(b_k\in\mathcal{B}\)</p>
<p>\(h_{b_i,k}\in\mathbb{C}^{1\times N}\) and \(f_k\in\mathbb{C}^{N\times 1}\)</p>
<p>\(\beta\) and \(f_k\) are optimization variables, and all other parameters are known</p>dipWed, 01 Apr 2015 01:50:11 -0400http://www.or-exchange.com/questions/11843/how-to-linearizeconvexify-this-constraintconvex-optimizationCapacitated Facility Location problem in Column Generation Pricing problemhttp://www.or-exchange.com/questions/11817/capacitated-facility-location-problem-in-column-generation-pricing-problem<p>As part of a column generation/branch-and-price procedure I have a master problem which needs to select a schedule for each exam subject to a number of set cover/knapsack constraints, and a pricing problem for each exam, which generates feasible schedules for the given exam.
For each exam, I have the following pricing problem which occasionally needs to be solved in an exact fashion. This pricing problem is the well-known Capacitated Facility Location Problem (with some side constraints). I've implemented this as a MIP in the latest version of Cplex (12.6). I'm looking for suggestions to speed up the exact pricing as it simply takes too long, especially when it needs to be solved for every exam.<br>
\begin{align}
max\; &\sum_{r\in R} \overline{c_r}z_r - \sum_{p\in P}\sum_{r \in R}d_{pr}x_{pr}&\\
\mbox{s.t. }&\sum_{R_l}z_r\leq 1 &\forall l\in L\\
&\sum_{r\in R}z_r\leq k &\\
&\sum_{r\in R}x_{pr}=1 &\forall p\in P\\
&mz_r \leq \sum_{p\in P} x_{pr}\leq q_rz_r &\forall r\in R\\
&\sum_{r\in R}q_rz_r\geq |P| &\\
&z_r\in {0,1} &\forall r\in R\\
&x_{pr}\in {0,1} &\forall p\in P, r\in R
\end{align}<br>
Variables: \(z_r\): use room r, \(x_{pr}\): assign student p to room r.<br>
Constraints explained:<br>
</p>
<ol>
<li>For some predefined subsets of rooms \(R_l\subset R\), only 1 room may be used</li>
<li>At most k rooms may be used</li>
<li>Every participant must be assigned to a room.</li>
<li>If a room r is used (\(z_r=1\)), then at least \(m\) , and at most \(q_r\) students need to be assigned to it</li>
<li>Redundant constraint which speeds up the model.</li>
</ol>
<p>Any concrete suggestions to speed up this pricing problem are welcome:</p>
<ol>
<li>I could look at valid inequalities (any in particular?). However, Cplex already automatically separates quite a few inequalities, so I'm not sure whether this actually is worth the trouble, especially because understanding and implementing separation algorithms can be very time consuming.</li>
<li>I could look at relaxations of the above problem which may be easier to solve. For example, in many vehicle routing problems, the pricing problem should select a tour where no stops are repeated, but in practice it is a lot easier to generate tours where this requirement is slightly relaxed. </li>
<li>I could try to find a stronger formulations for the above problem.</li>
<li>I could try to develop some exact algorithm which does not rely on Cplex?</li>
</ol>
<p>Typically, there are a lot of ways to speed up Branch-and-price procedures, but this can both be very time consuming and difficult. Experiments revealed that the majority of time is spent on solving the pricing problem exact when no columns could be generated heuristically and when the bounds are not strong enough to prune the node. Hence I was wondering whether there are people with experience in solving Facility Location problems. Can I do much better than solving the above model through Cplex? Are there any particular references you would recommend? Any particular idea's you may have in improving or solving the above model? From my own experience, it can be very difficult to outperform recent versions of Cplex for certain problems, even with some fancy dedicated algorithms, so I prefer to avoid scenario's where I'm spending a lot of time on understanding and implementing a dedicated procedure which may only yield minor improvements in terms of speed.</p>JorisSun, 29 Mar 2015 11:55:14 -0400http://www.or-exchange.com/questions/11817/capacitated-facility-location-problem-in-column-generation-pricing-problemcolumn-generationfacility-locationDynamic programming for ILPhttp://www.or-exchange.com/questions/11819/dynamic-programming-for-ilp<p>How can we use Dynamic programming technique to solve a ILP/LP? Any book or resources?? thanks </p>cbotMon, 30 Mar 2015 03:28:04 -0400http://www.or-exchange.com/questions/11819/dynamic-programming-for-ilpdynamic-programminginteger-programmingModeling activation of machinehttp://www.or-exchange.com/questions/11826/modeling-activation-of-machine<p>I want to model the power consumption of a machine in a given time interval.</p>
<p>The time interval is divided in equidistant time points \({0,1,2,...,60 * \text{T}}\) with \(\text{T}\) given. At each time point the machine has a power consumption. I am allowed to activate the machine at \({0,60,60 * 2,60 * 3}\). So i am only allowed to active the machine at every minute and the power is measured every second.</p>
<p>My current model looks like this: For every activation time of my machine i create a binary variable \(x_i\) (in this case \(x_0, x_1, x_2, x_3\)) and a vector \(p_i\) (in this case \(p_0, p_1, p_2, p_3\)). The binary variables decides when i activate the machine and \(p_i\) contains the corresponding power profile. (All of the contains the same non zeros but shifted depending on the activation time, each \(p\) contains as many time points in the time interval)</p>
<p>With the constraint \(x_0+x_1+x_2+x_3=1\), I can force that only one activation time is chosen.</p>
<p>If I add the constraint:</p>
<p>$$p_0 * x_0 + p_1 * x_1 + p_2 * x_2 + p_3 * x_3 = y$$</p>
<p>Now \(y\) contains the power of the machine depending on what activation time I have chosen. [1: \(y\) is a vector of variables.]</p>
<p>My question is:</p>
<p>Can i model this behavior, that \(y\) contains (1) with instead of binary variables I introduce \(z_0\) with bounds \(0 \le z_0 \le 3\). So instead of a binary variable for each activation time, I want one variable which takes the exact activation time. But I could not come up with a way to get \(y\) contain the right power profile with this variable \(z_0\).</p>zBirdyMon, 30 Mar 2015 15:12:38 -0400http://www.or-exchange.com/questions/11826/modeling-activation-of-machineformulationsmathematical-modelingMaximize profit with dynamic programminghttp://www.or-exchange.com/questions/11812/maximize-profit-with-dynamic-programming<p>I have 3 tables…</p>
<pre><code>quantity, expense, profit
1, 2312, 3212
</code></pre>
<p>All equal structure but with different values and different number of rows.</p>
<p>I want to write a recursive function describing the optimal choices of quantities in order to maximize my profit.</p>
<p>I have a given amount to spend and the total expenses can't exceed this.</p>
<p>Besides, I use the notation that p_nj should the profit in table n and quantity j and c_{nj} should express the cost of choosing quantity j in table n.</p>
<p>I think it's something like</p>
<p>f_n(A) = max{ p_nj + f_{n+1}(A-c_nj) }</p>
<p>where A is the amount I can invest.</p>
<p>My intuition is that I'm adding the profit p_nj for each iteration and subtracting the cost from the total available amount (A-c_nj).</p>
<p>I don't think it's correct but I guess it's something like that. How can I iterate through all the three different tables with recursion?</p>OrnSat, 28 Mar 2015 10:23:11 -0400http://www.or-exchange.com/questions/11812/maximize-profit-with-dynamic-programmingdynamic-programmingrecursive-equationoptimizationCPLEX error 1217 : No solution existshttp://www.or-exchange.com/questions/11773/cplex-error-1217-no-solution-exists<p>Hey people,
Greetings. I am facing a problem in Cplex concert technology in C++. The program structure is like this:</p>
<ol>
<li>Declarations</li>
<li>creating a model </li>
<li>solve problem P1</li>
<li>read values in variables</li>
<li>run a for loop upto n instances:<ol>
<li>create a new model inside</li>
<li>solve problem P2 = P1 + a constraint</li>
<li>read objective value</li>
<li>read values</li>
</ol>
</li>
</ol>
<p>Now in this program, CPLEX solves the first problem and gives out the values whereas in the second problem on the execution it throws up the error : CPLEX error 121: No solution exists. I even removed that additional constraint, then also it throws up the same error. Can someone help me ? Thanks :)</p>PrasannaTue, 24 Mar 2015 06:34:30 -0400http://www.or-exchange.com/questions/11773/cplex-error-1217-no-solution-existscplex1217errorModelling constraint as linearhttp://www.or-exchange.com/questions/11806/modelling-constraint-as-linear<p>Good evening to anybody,
My question concerns the modelling, via linear relations, of the following situation:
Let U, K in {-6, .. , 6} integers
Let A in {0, 1} binary
Let D in {0, 1} binary
What I want to do is to model the condition:
D = 1, iff (U > 0 OR K > 0) AND A = 1
Otherwise, D should equal 0.
Can anyone help?
Thanks in advance for your time
John Tass </p>John TassThu, 26 Mar 2015 17:25:23 -0400http://www.or-exchange.com/questions/11806/modelling-constraint-as-linearconditionalmodellingconstraintsEuclidean test instances for the Quadratic Assignment Problemhttp://www.or-exchange.com/questions/11810/euclidean-test-instances-for-the-quadratic-assignment-problem<p>I am searching for Euclidean distance Benchmark instances for the QAP. </p>
<p>Thomas Stützle and Susana Fernandes proposed such instances in their paper "New Benchmark Instances for the QAP and the Experimental Analysis of Algorithms", but the web address is down and I cannot find these instances anywhere. Also, the QAPLIB seems to contain only one such instance.</p>
<p>Any suggestions?</p>JF MeierFri, 27 Mar 2015 10:57:46 -0400http://www.or-exchange.com/questions/11810/euclidean-test-instances-for-the-quadratic-assignment-problemquadratic-programmingbenchmarkMathematical formulationhttp://www.or-exchange.com/questions/11731/mathematical-formulation<p>model xi + yi = zi</p>alexmathTue, 17 Mar 2015 18:40:32 -0400http://www.or-exchange.com/questions/11731/mathematical-formulationlinear-programmingoptimizationformulationsmodellingCheck if a polyhedron has a non-empty intersection with the unit ball.http://www.or-exchange.com/questions/11778/check-if-a-polyhedron-has-a-non-empty-intersection-with-the-unit-ball<p>I'm trying to find a way (either algorithmically or analytically) to check if there exists some n-dimensional vector v in a polyhedron, i.e. \(Av\geq b\) for some positive definite A and a rhs b. such that \(||v||\leq 1\). Anybody any ideas on this problem?</p>LongTue, 24 Mar 2015 19:49:05 -0400http://www.or-exchange.com/questions/11778/check-if-a-polyhedron-has-a-non-empty-intersection-with-the-unit-ballfeasibilitysolving TSP using solvershttp://www.or-exchange.com/questions/11784/solving-tsp-using-solvers<p>The number of constraints in ILP formulations of TSP is really large. If I use a solver to solve the ILP, how can I generate the constraints for large input? </p>
<p>thanks </p>cbotWed, 25 Mar 2015 09:44:02 -0400http://www.or-exchange.com/questions/11784/solving-tsp-using-solversinteger-programmingHow to model the following banking question?http://www.or-exchange.com/questions/11683/how-to-model-the-following-banking-question<p>A group has 200 members. Each member settles up 100,000 S each month. The group runs a lottery every month and pays 10,000,000 $ to one member of the group i.e.,winner. The winner do not settle up anymore and is excluded from the lottery round. The other 199 member settle up the same amount (100,000 S) for the next month and the winner get 10,000,000 S again like the last month. He is excluded from the lottery round and does not settle up anymore. This routine will go on and on.<br>
1) Is it possible to pay 10,000,000 to all members for 10 years?<br>
2) Is it possible to pay 10,000,000 to all members by increasing the settling up amounts for each month and also finish the routine in 12 years?<br>
3) Is it possible to pay 1,000,000 more to the winner after 5 years? e.g., after 5 years the winner gets 11,000,000 and after 6 years 12,000,000<br>
I wrote the following code to address computer model of this problem which addresses some aspect of this question.<br>
</p>
<pre><code>N=200; % Number of members
m=10*12; %Number of months =Years*12
si=100000; % settel up amount
sp=0; %surpass amount for every month (eg.10,000)
Total_money=0; % Initialization
overall_each_month=zeros(m,1);
for ii=1:m
overall_each_month(ii)=(si+ii*sp)*(200-ii);
Total_money=Total_money+(si+ii*sp)*(200-ii);
end
fprintf(' The total accumulated money after %d month is %d',m,Total_money)
moeny_for_each=Total_money/N
</code></pre>
<p>Please tell me how you mathematically model this problem.</p>ElectricmanSat, 14 Mar 2015 13:31:52 -0400http://www.or-exchange.com/questions/11683/how-to-model-the-following-banking-questionoperations-researchmathematical-modelinghomeworkConverting objective function from non-linear to linear formhttp://www.or-exchange.com/questions/11779/converting-objective-function-from-non-linear-to-linear-form<p>Hello All,</p>
<p>I am trying to formulate an optimization problem. The optimization problem involves non-linear objective function. Since I am using CPLEX for solving, it is required to convert the function into linear form. The objective function has the following form: </p>
<p>Minimize Z = E[f(x) + min {f(y}]</p>
<p>Here, "E" stands for expectation over certain instances.</p>
<p>Thanks in advance.</p>MajbahTue, 24 Mar 2015 20:47:50 -0400http://www.or-exchange.com/questions/11779/converting-objective-function-from-non-linear-to-linear-formnon-linearcplexsubgradient optimization converges in wrong directionhttp://www.or-exchange.com/questions/11764/subgradient-optimization-converges-in-wrong-direction<p>I'm trying to solve a problem through subgradient optimization, but I get results which (I think) are wrong: the problem seems to optimize in the wrong direction!<br>
</p>
<p>Define problem P (For simplicity, some constraints are omitted):<br>
</p>
<p>\begin{align}
P:&max\; \sum_{r\in R} c_rz_r - \sum_{p\in P}\sum_{r \in R}d_{pr}x_{pr}&\\
&\sum_{r\in R}z_r\leq k &\\
&\sum_{p\in P} x_{pr}\leq q_rz_r &\forall r\in R\\
&\sum_{r\in R}x_{pr}=1 &\forall p\in P\\
&z_r\in {0,1} &\forall r\in R\\
&x_{pr}\in {0,1} &\forall p\in P, r\in R
\end{align}</p>
<ul>
<li>Dualize equality constraint \(\sum_{r\in R}x_{pr}=1\). Lagrangian problem \(UB(u)\) for vector of multipliers \(u\) becomes:
\(UB(u)=max\; \sum_{r\in R} c_rz_r - \sum_{p\in P}\sum_{r \in R}d_{pr}x_{pr}+\sum_{p\in P}u_p(1-\sum_{r\in R}x_{pr})\) subject to the aforementioned constraints.</li>
<li>Lagrangian problem becomes: \(\min_u UB(u)\)<br>
</li>
</ul>
<p>The problem is being solved through subgradient optimization:</p>
<ul>
<li>Initial multipliers (iteration 0) \(u^0_p=-\min_{r \in R}d_{pr}\)</li>
<li>Update procedure for multipliers (iteration k): \(u^{k+1}_p=u^k_p+T_kG_p\)</li>
<li>\(G_p\) is the subgradient: \(G_p=1-\sum_{r \in R}x^k_{pr}\)</li>
<li>\(T_k\) is the stepfunction at iteration k: \(T_k=\pi_k\frac{UB(u^k)-LB}{\sum_{p\in P}(G_p)^2}\)</li>
<li>\(LB\): feasible solution to problem P</li>
<li>scalar: \(0\leq \pi_k \leq 2\)</li>
</ul>
<p>At each iteration k, set \(UB=min\{UB,UB(u^k)\}\), where \(UB=\infty\) at iteration 0. Scalar \(\pi_k\) is halved when \(UB\) hasn't improved for 5 consecutive iterations.</p>
<p>For simplicity, the Lagrangian problem \(UB(u)\) for a given vector of multipliers is solved by MIP (cplex). Below is some sample output. As you can see, the bound goes up, instead of down: it seems to solve \(\max_u UB(u)\) instead of \(\min_u UB(u)\). Any suggestions what might go wrong? Is there an issue with the update procedure or with the fact that my costs have negative values?</p>
<blockquote>
<p>Stepsize: 6.565737051792829 upperBound of iter0: -984.0<br>
Stepsize: 3.0082715495633363 upperBound of iter1: -899.5019920318724<br>
Stepsize: 2.0316465807429247 upperBound of iter2: -662.1513284609905<br>
Stepsize: 1.7855700863524753 upperBound of iter3: -402.756342040602<br>
Stepsize: 1.678073178370583 upperBound of iter4: -108.1118703105995<br>
Stepsize: 1.7400454511327519 upperBound of iter5: 223.50306419748796<br>
Stepsize: 1.7327160706457851 upperBound of iter6: 674.9821292354101<br>
Stepsize: 0.9576389006405794 upperBound of iter7: 1264.105593254979<br>
Stepsize: 1.0027603121135473 upperBound of iter8: 1618.4319864919912<br>
Stepsize: 1.0320776141461039 upperBound of iter9: 2004.4947066557077<br>
Stepsize: 1.063753958529959 upperBound of iter10: 2420.4219851565863<br>
Stepsize: 1.1237712944048484 upperBound of iter11: 2874.754983785003<br>
Stepsize: 1.1855063109302708 upperBound of iter12: 3383.3321355636563<br>
Stepsize: 0.6163832611973933 upperBound of iter13: 3950.2524261060476<br>
Stepsize: 0.6446325258735308 upperBound of iter14: 4268.306188883901<br>
...<br>
Stepsize: 1.2269253063859669E-4 upperBound of iter92: 9069.162017348759<br>
Stepsize: 1.2269335132142112E-4 upperBound of iter93: 9069.234774019435<br>
Stepsize: 1.2269417200973492E-4 upperBound of iter94: 9069.307531176766<br>
Stepsize: 1.226949927035382E-4 upperBound of iter95: 9069.38028882076<br>
Stepsize: 1.2269581340283118E-4 upperBound of iter96: 9069.453046951437<br>
Stepsize: 6.134831705380688E-5 upperBound of iter97: 9069.525805568788<br>
Stepsize: 6.134852223137492E-5 upperBound of iter98: 9069.562185120798<br>
Stepsize: 6.134872740962918E-5 upperBound of iter99: 9069.598564794482<br>
</p>
</blockquote>
<p>In this example:</p>
<ul>
<li>UB: -984.0 (obtained at first iteration)</li>
<li>LB: -1808.0 (heuristic solution for problem P)</li>
<li>LPrelax: -964.0 (Linear program relaxation for problem P)</li>
<li>Exact: -1753.0 (Exact solution to problem P)</li>
</ul>
<p>Since this is my first subgradient optimization implementation, any suggestions are welcome. For the updating of the multipliers, I've used: </p>
<ul>
<li>M. Fisher, An Application Oriented guide to Lagrangian Relaxation (1985)<br>
</li>
<li>J. Beasley, Modern heuristic techniques for combinatorial problems (1993), p243-303</li>
</ul>JorisMon, 23 Mar 2015 09:10:24 -0400http://www.or-exchange.com/questions/11764/subgradient-optimization-converges-in-wrong-directionlagrangian-relaxationDual expression construction of polytopehttp://www.or-exchange.com/questions/11771/dual-expression-construction-of-polytope<p>Basically, we have an incremental sets of vertices </p>
<p>$${V_1} \subset {V_2} \subset ...$$</p>
<p>for each of them, we could build a polytope $${P_i} = Conv({V_i})$$ </p>
<p>Consequently, we can compute </p>
<p>$${F_i} = Facet\left( {{P_i}} \right)$$</p>
<p>So my question is, what is the best numerical procedures (name of the method, packages etc.) to compute such $F_i$ from given $${V_1} \subset {V_2} \subset ...$$ ? Thank you.</p>ChivalryTue, 24 Mar 2015 00:52:27 -0400http://www.or-exchange.com/questions/11771/dual-expression-construction-of-polytopepolytopebeta in Nesterov's first method for piece wise linear convex optimization problemhttp://www.or-exchange.com/questions/11770/beta-in-nesterovs-first-method-for-piece-wise-linear-convex-optimization-problem<p>Basically, I am trying to implement Nesterov's first method in solving convex piece-wise linear convex optimization problem, from this website:</p>
<p><a href="https://blogs.princeton.edu/imabandit/2013/04/01/acceleratedgradientdescent/">https://blogs.princeton.edu/imabandit/2013/04/01/acceleratedgradientdescent/</a></p>
<p>But then, such beta does not exist convex piece-wise linear function. So I am wondering what shall I put into beta for my implementations....</p>
<p>PS: LP is not feasible because there are 2^80 such hyper planes.</p>ChivalryTue, 24 Mar 2015 00:49:47 -0400http://www.or-exchange.com/questions/11770/beta-in-nesterovs-first-method-for-piece-wise-linear-convex-optimization-problemconvex-optimizationMILP formulation of TSPhttp://www.or-exchange.com/questions/11759/milp-formulation-of-tsp<p>I am trying to understand the MILP version of TSP which has a set of constraints of the form:</p>
<p>\(u_i - u_j + n x_{ij} \le n-1\) for \(1 \le i , j \le n\).</p>
<p>Whats the idea of this formulation<br>
thanks</p>cbotMon, 23 Mar 2015 04:05:29 -0400http://www.or-exchange.com/questions/11759/milp-formulation-of-tsptspQuadratic Assignment Problem for Euclidean Distanceshttp://www.or-exchange.com/questions/11753/quadratic-assignment-problem-for-euclidean-distances<p>The Quadratic Assignment Problem is known to be hard. Is there any way to improve solvability if the involved distances are known to be Euclidean?</p>JF MeierSun, 22 Mar 2015 06:01:32 -0400http://www.or-exchange.com/questions/11753/quadratic-assignment-problem-for-euclidean-distanceseuclideanquadratic-programmingUser Cuts and the cut pool in cplexhttp://www.or-exchange.com/questions/11715/user-cuts-and-the-cut-pool-in-cplex<p>I'm working on a series of hard combinatorial optimization problems, the constraints of which can be described using Lazy Cuts (i.e. inequalities generated "on the fly" as needed). I also can generate user cuts based on specific combinatorial reasoning. At the end of the run I report how many of each (lazy or user) I generated, and cplex reports the number that it actually used. On the most challenging problems I find that it only uses a small fraction. For example on one run I generated 7565 user cuts, and 302 lazy cuts, but cplex only used 364 (I assume that it used all of the lazy cuts, since they're requirements of the problem, so this leaves only 62 out of 7565 that were useful). I know that cplex has some sort of scoring mechanism for cuts in the cut pool, and only uses the ones that score well enough. Does anyone know any more specifics about it? It would be really useful if I could get cplex to report which of the cuts it actually used, so that I might discern something about them and try to generate only those that are useful. Right now I do have any option in my code to generate only those cuts that are deep enough: if the potential cut has the form \(a^T \cdot x \le b\) I'll only generate it if \( ( a^T \cdot x^ * - b ) / \parallel a \parallel \gt \delta \) for some \(\delta \gt 0\) which is a parameter (and \(x^*\) is the current LP optimum). This sometimes helps a lot (e.g. it sped up one problem by a factor of 4), but sometimes it doesn't have much of an effect.</p>VictorSMillerMon, 16 Mar 2015 13:01:45 -0400http://www.or-exchange.com/questions/11715/user-cuts-and-the-cut-pool-in-cplexuser-cutscplexfinding Nesterov's paperhttp://www.or-exchange.com/questions/11732/finding-nesterovs-paper<p>Below is a highly cited paper on convex minimization, I want to learn his method. But I can't find it anywhere... Can anyone help?
9. Nesterov, Yu.: A method for unconstrained convex minimization problem with the rate of convergence O( 1 ). Doklady AN SSSR (translated as Soviet Math. Docl.) 269, 543–547 (1983)</p>ChivalryTue, 17 Mar 2015 21:15:19 -0400http://www.or-exchange.com/questions/11732/finding-nesterovs-paperconvex-optimizationconvexReformulation Linearization Techniquehttp://www.or-exchange.com/questions/11712/reformulation-linearization-technique<p>Reformulation Linearization Technique (RLT) (Sherali and Adams) is applied successively to MILP formulations by multiplying each of the constraints by 2^d*(n choose d) polynomial factors of degree d. These factors are made up of d products of binary variables and 1 minus the binary variables, where n is the number of binary variables. If the factors are of degree n, the projection onto the original space of variables of the formulation obtained by multiplying by these factors leads to the convex hull of feasible solutions.</p>
<p>If one were to apply RLT with factors of degree 1 to a single constraint (so either multiply by the binary variable or by 1 minus the binary variable) rather than to the whole formulation, and then linearize the resulting formulation, would this already lead to a tightening of the feasible region of the LP?</p>
<p>Could one get away with applying RLT to a single constraint rather than having to apply it to the whole formulation?</p>CCAMon, 16 Mar 2015 12:35:06 -0400http://www.or-exchange.com/questions/11712/reformulation-linearization-techniquerltmilplptighteningInactive constraints and "presolve remove all rows and columns" using MIP solverhttp://www.or-exchange.com/questions/11701/inactive-constraints-and-presolve-remove-all-rows-and-columns-using-mip-solver<p>Hello, I am now using Gurobi to solve the restricted master problem in Benders Decomposition. The model is shown in the picture below. </p>
<p>Variables x are binary, while alpha, beta and theta are continuous. Constants y and w are input from the subproblem.</p>
<p>(5), (6) and (7) linearize the product of alpha and x. </p>
<p>When solve this model in Gurobi, if (2) keeps with "<=", the objective function value will be 0:</p>
<hr>
<pre><code>Optimize a model with 584 rows, 577 columns and 1997 nonzeros
Coefficient statistics:
Matrix range [1e+00, 1e+08]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 1e+08]
Found heuristic solution: objective -0
Presolve removed 584 rows and 577 columns
Presolve time: 0.00s
Explored 0 nodes (0 simplex iterations) in 0.01 seconds
Thread count was 1 (of 4 available processors)
Optimal solution found (tolerance 1.00e-04)
Best objective -0.000000000000e+00, best bound -0.000000000000e+00, gap 0.0%
</code></pre>
<hr>
<p>But, if (2) takes "==", the output will be:</p>
<hr>
<pre><code>Optimize a model with 584 rows, 577 columns and 2035 nonzeros
Coefficient statistics:
Matrix range [1e+00, 1e+08]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 1e+08]
Found heuristic solution: objective -0
Presolve removed 579 rows and 572 columns
Presolve time: 0.00s
Presolved: 5 rows, 5 columns, 12 nonzeros
Variable types: 1 continuous, 4 integer (4 binary)
Root relaxation: objective 7.500023e+07, 5 iterations, 0.00 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 7.5000e+07 0 4 -0.00000 7.5000e+07 - - 0s
H 0 0 420.7187790 7.5000e+07 - - 0s
Explored 0 nodes (5 simplex iterations) in 0.02 seconds
Thread count was 2 (of 4 available processors)
Optimal solution found (tolerance 1.00e-04)
Best objective 4.207187790000e+02, best bound 4.207187790000e+02, gap 0.0%
</code></pre>
<hr>
<p>Since this problem is a maximization problem, and the objective function can have a value which is much greater than 0, why constraints (2) cannot be active automatically?</p>
<p>Besides, if constraints (2) takes "<=", we see that all rows and columns are removed during the presolve process. How could this happen? </p>
<p>I write the model after presolve to ".lp" file, I see there are no constraints. Then at which situation, will all the rows and columns be removed?</p>
<p>I am confused with this strange phenomenon for several days. It seems really a bottleneck in my current research. I hope that you can help me fix it.</p>
<p>I really appreciate for your help. Thank you. </p>
<p><img alt="alt text" src="http://www.or-exchange.com/upfiles/RMP_4.jpg"></p>a200710920Sun, 15 Mar 2015 17:18:53 -0400http://www.or-exchange.com/questions/11701/inactive-constraints-and-presolve-remove-all-rows-and-columns-using-mip-solverbenders-decompositionmippresolversgurobiLinearize min-max conditionhttp://www.or-exchange.com/questions/11669/linearize-min-max-condition<p>Hi,</p>
<p>I have the following condition:</p>
<p>\(x\) and \(y\) are continuous variables and \(\text{C}\) is a constant.</p>
<p>If \(\text{C} - 0.7x > 0\) then \(y = \min(\text{C},1.3x)\) else \(y = 0\).</p>
<p>In other words \(y = \min(\text{C}, 1.3x, \max(0, \text{M} \cdot \text{C} - 0.7x)) \)</p>
<p>And the objective is to maximize \(y\).</p>
<p>Is it possible to model this as a set of linear constraints without using a binary variable?</p>
<p>I want to stay in the LP regime and not create an MIP.</p>
<p>Thanks!</p>Rajeev NFri, 13 Mar 2015 07:14:41 -0400http://www.or-exchange.com/questions/11669/linearize-min-max-conditionlinear-programminglinearization-techniquewhat to measure to setup an assignment modelhttp://www.or-exchange.com/questions/11699/what-to-measure-to-setup-an-assignment-model<p>I am an currently an OR intern at a military simulation center in NIgeria, we simulate conflict for the MIlitary and paramilitary organisations in NIgeria. I discovered that the centre does not have a quantitative criteria for assigning workstations to operators. Based on my OR training, i quickly realize that the appropriate model to enploy in solving or at least reach a more optimal assignment is the assignment model.The challenge am facing is what to measure,what will serve as a numerical input to developing the model.I thought i should rate the operatorts based on the number of years they have worked in the centre or there their years of experience at the centre.Please help me out. OR FOR LIFE !!! </p>ismahiiSun, 15 Mar 2015 16:27:08 -0400http://www.or-exchange.com/questions/11699/what-to-measure-to-setup-an-assignment-modelsettingupassignmentmodelstate of art non smooth convex optimizationhttp://www.or-exchange.com/questions/11698/state-of-art-non-smooth-convex-optimization<p>Basically, I am trying to implement non-smooth convex optimization in c++. I am wondering what is the state of art condition of non-smooth convex optimization. For example, what's the best method currently in practice? What is the best solver available? And what is the most recent theoretical progress/ or the most recent review of this topic? Thank you :D</p>ChivalrySun, 15 Mar 2015 12:38:25 -0400http://www.or-exchange.com/questions/11698/state-of-art-non-smooth-convex-optimizationoptimizationconvex-optimizationInternship experience before graduate school application?http://www.or-exchange.com/questions/11677/internship-experience-before-graduate-school-application<p>Hello,</p>
<p>I am an undergraduate student who dreams of going to graduate school (preferably PhD) in operations research. I hope this is not inappropriate use of the forum, but I would really appreciate help and advice regarding the best opportunities to prepare for grad school. </p>
<p>Due to financial constraints, I have to get a job in the summer as opposed to doing research. I know that this will strongly work against me in terms of grad school admissions (I do plan to write a research thesis next year at least), but I have tried to find job opportunities that are as relevant as possible to my future goals and can help me develop some technical skills.</p>
<p>From both ad com and personal development perspectives, I would really appreciate any advice regarding which job experience would be viewed best. </p>
<p>I have received four offers:</p>
<ul>
<li>
<p><strong>Profitability data analysis with airline company:</strong> I'm very interested in transportation applications of OR; however, <strong>the work is mostly done in Excel</strong> so this job cannot be terribly quantitative or statistically rigorous. I originally thought this internship was in the most OR/IE focused department, but I now know that this is not the case.<br>
</p>
</li>
<li>
<p><strong>Well-regarded analytics start-up:</strong> This company has gotten a lot of press and is succeeding in the field of "data science". They have many engineers and programmers working in SAS, Python, R, etc. I would be in a department <strong>bridging client needs and data science capabilities</strong>. I would get to do some coding/modeling, but also a fair amount of just discussing business problems and explaining methods and procedures to the client.</p>
</li>
<li>
<p><strong>Economic/litigation consulting firm:</strong> This opportunity has little to do with OR but is very statistical. The company does statistical and econometrics research (e.g. estimating damages by modeling counterfactuals) to support expert witnesses. I would be <strong>coding, managing, and analyzing data in SAS, possibly contributing to reports through drafted materials and charts.</strong> I would be working on a <strong>team including PhDs (in Econ, Stats, etc. not OR) and expert witnesses,</strong> who can be professors from top universities. Sometimes these individuals are willing to write LORs for graduate school; however, I'm not sure how much this helps since none of them are actually in OR. </p>
</li>
<li>
<p><strong>More traditional, large consulting firm with operations/tech focus:</strong> This company has <strong>some OR intensive projects</strong> and has been involved in an Edleman Award winning project previously. <strong>However, I could (and likely would) be staffed on traditional tech implementation, strategy, or management cases</strong> with absolutely no relation to OR and I don't have control over this or insight before committing.</p>
</li>
</ul>
<p>Thank you so much for reading and any thoughts or advice anyone can offer. I know true research is far superior to work experience, but I am hoping that I can find some sort of a job that would still support my candidacy for grad school. </p>orstudent315Fri, 13 Mar 2015 11:27:29 -0400http://www.or-exchange.com/questions/11677/internship-experience-before-graduate-school-applicationcareereducationundergraduategraduateschoolinternshipssolve weighted set cover through knapsackhttp://www.or-exchange.com/questions/11654/solve-weighted-set-cover-through-knapsack<p>Given an algorithm for the Knapsack problem, can you also solve the min set covering problem?</p>
<p>Min set covering problem:<br>
min \sum_j c_j y_j such that<br>
\sum_j s_j y_j >= b<br>
y_j \in {0,1}<br>
</p>
<p>Knapsack problem:
max \sum_j c_j y_j such that<br>
\sum_j s_j y_j <= b<br>
y_j \in {0,1}<br>
</p>
<p>================================<br>
</p>
<p>Answer (As per Sune's recommendation below):<br>
1. Substitute every y_j by 1-z_j in the set covering problem.
min \sum_j c_j (1-z_j) such that<br>
\sum_j s_j (1-z_j) >= b<br>
z_j \in {0,1} </p>
<p>rewriting and rearranging these constraints yields:<br>
max \sum_j c_j z_j - sum_j c_j such that<br>
\sum_j s_j z_j <= \sum_j s_j - b <br>
z_j \in {0,1}<br>
</p>
<p>This problem is indeed the desired knapsack problem. the "- sum_j c_j" term in the objective is a constant and can therefore be ignored. After solving this knapsack problem, one can obtain a feasible solution to the set cover problem by setting y_j=1-z_j.<br>
Interpretation: Let c_j be the value or cost of an item j, and s_j its weight. The knapsack problem tries to select the most expensive items while keeping their total weight equal or below \sum_j s_j - b. As a result, the remaining items will be as cheap as possible while having a total weight larger or equal to \sum_j s_j-(\sum_j s_j - b)=b. </p>JorisWed, 11 Mar 2015 17:29:28 -0400http://www.or-exchange.com/questions/11654/solve-weighted-set-cover-through-knapsackknapsackapproximating continuous generalized assignment problem (GAP)http://www.or-exchange.com/questions/11649/approximating-continuous-generalized-assignment-problem-gap<p>Hi,</p>
<p>I am looking for a heuristic algorithm that can efficiently solve the linear relaxation of <a href="http://en.wikipedia.org/wiki/Generalized_assignment_problem">generalized assignment problem</a> which can have a large dataset. We want to let variable <em>x</em> be continuous between <em>0</em> and <em>1</em>. I appreciate if you can suggest me an algorithm to find a solution with an acceptable quality in a reasonable time (without using linear solvers like Cplex, etc).<br>
</p>MehrdadWed, 11 Mar 2015 14:35:47 -0400http://www.or-exchange.com/questions/11649/approximating-continuous-generalized-assignment-problem-gapapproximationheuristicslinear-programminglevel method takes too much timehttp://www.or-exchange.com/questions/11653/level-method-takes-too-much-time<p>Basically, I am implementing the level method on a non-smooth convex optimization problem with dimension=3000 :
<a href="http://www2.isye.gatech.edu/~nemirovs/Lect_EMCO.pdf">http://www2.isye.gatech.edu/~nemirovs/Lect_EMCO.pdf</a></p>
<p>However, at late stage of the algorithm, the algorithm spends too much time in calculating the linear programming and quadratic programming (basically takes up to a minute) while function evaluation only takes up to less than 1 second.... I am wondering what would be the state of art approach on this issue? Thank you:D </p>ChivalryWed, 11 Mar 2015 16:46:30 -0400http://www.or-exchange.com/questions/11653/level-method-takes-too-much-timeconvex-optimizationnonlinear-optimizationconvex