# Search Results

Results tagged with
Search options answers only user 67
7 results

For questions on constraints controlled by binary variables.

You can declare $\lbrace X_1, X_2 \rbrace$ to be a type 1 special ordered set (SOS1). Assuming that your solver understands SOS1 constraints, it will enforce what you want internally, possibly by a "b …
answered Nov 25 '20 by prubin
I don't think you can improve on A1 (which looks correct), other than perhaps tightening the bounds $M$ and $m$ (which would be dependent on the specifics of the problem). Regarding B, would the solve …
answered May 19 '20 by prubin
Consider the following tiny example. You have two factories, one warehouse and two product. Factory 1 can produce both goods in sufficient quantity to meet demand but has a very large cost coefficient …
answered Jan 30 '21 by prubin
First question: Yes, your algebraic formulation is correct. Second question: I would lean toward using the algebraic formulation, for two reasons. First, it is not solver-specific. Second, a reader …
answered Aug 17 '19 by prubin
The answer to the first part is yes, provided that you are using a solver that supports indicator constraints. As far as I know, there is no "standard" notation for it. Something like a_1 x_1 \le b …
answered Apr 12 '20 by prubin
I suspect you have not assigned names to your variables. Try doing that and then exporting the .lp file, and I think you will discover that the bidirectional constraint involves a variable that CPLEX …
answered Jun 8 '21 by prubin
You can do it if you have a fairly high pain tolerance. :-) Let's start by introducing binary variables $Z_1,\dots, Z_K$ (where $K$ is the dimension of $X$) and making $N$ a variable. Add constraints …
answered Dec 7 '21 by prubin