# Tag Info

1

The reference front is another name for the pareto front of the problem. You find it either by solving the problem symbolically, constructing a problem around some pareto front or running and global optimizer long enough. If you want to normalize the any front it is sensible to do so using the reference front. Over what (hyper) cuboid you normalize the ...

3

I'm assuming your w, R, D variables are not in form of dictionaries (if they are the function below becomes much simpler). I go with "easier to ask for forgiveness than permission" (EAFP) programming. def _cos(i,t): try: _r = R[i,t] except KeyError: _r = 0 try: _d = D[i,t] except KeyError: _d = 0 ...

2

If your notebook could be executed both on Colab or on a different environment (such as a local Jupyter notebook), you could add a couple of checks, before downloading and reinstalling pyomo and ipopt every time, as follows: import shutil import sys import os.path if not shutil.which("pyomo"): !pip install -q pyomo assert(shutil.which(&...

2

After a few hours extra deliberation and and working on the problem, I was able to figure out the reason. It was as I thought initially and my calculation for my flow_in wasn't DCP and I am not entirely sure or understand why, but I will be definitely teaching myself this in the time going forward. I was able to adjust the calculation to look like the ...

1

You can adapt the algorithm gift wrapping algorithm for finding a convex hull to this problem. This algorithm has an explicit step where it "straightens" out the cavities you want. This can be prevented by adding an additional condition that this is only allowed to happen if the new point is more left (as is done when constructing a convex hull) ...

3

The following package installation should be done before staring the Pyomo model !pip install pyomo from pyomo.environ import * import matplotlib.pyplot as plt !wget -N -q "https://ampl.com/dl/open/ipopt/ipopt-linux64.zip" !unzip -o -q ipopt-linux64 Then you can run your NLP model model = AbstractModel() model.x = Var(bounds=(0,1.2), within=Reals)...

4

The concept of promising regions (unlike many other concepts in optimization) doesn't have a mathematical definition. It is more an analogy people use to justify why exploring some¹ neighborhood of good solutions leads in practice to other good solutions in particular in derivative free optimization. Different algorithms that exploit promising regions also ...

6

You want to model constraints of the form $$x_1 \le a_1 \quad \Longrightarrow \quad x_2 \in [b_2,c_2]$$ Define a binary variable $y \in \{0,1\}$ and use constraints \begin{align*} 0 &\le x_1 \le a_1 + M_1(1-y) \tag{1}\\ b_2 - M_3(1-y) &\le x_2 \le c_2 +M_2 (1-y) \tag{2} \end{align*} Constraint $(1)$ enforces $y=1 \; \Longrightarrow \; x_1 \le a_1$,...

6

It is not true in general, but you can make it work with $$\max\sum_{i=1}^{n}\log(1-a_{i})x_{i}$$ Since $\log$ is monotonic, your objective is equivalent to $$\max\log\left(\prod_{i=1}^{n}(1-a_{i}x_{i})\right)$$ which becomes $$\max\sum_{i=1}^{n}\log(1-a_{i}x_{i})$$ and finally, since $x_i$ is binary and $\log(1) = 0$ $$\max\sum_{i=1}^{n}\log(1-a_{i})x_{i}$$ ...

2

As the boosted trees are too complex to be modeled as an explicit mathematical function - unless maybe one is prepared to spend a tremendous amount of effort - such an objective would be considered a black box optimization problem. An optimization problem is called "black box" when an explicit formula for the objective function is not known, and ...

6

No it's not true in general. Consider $n=4$ with $a=(0.3,0.7,0.5,0.5)$ under the constraint $(x_1 \wedge x_2) \text{xor}(x_3\wedge x_4)$ which can be expressed in terms of MILP by introducing helper binary variables. For the linear term, $(1,1,0,0)$ and $(0,0,1,1)$ are equally good optima while for the product term they obviously differ in quality, meaning ...

4

One of the most important things to keep in mind is that we should install Pyomo in another environment than the base environment together with its solvers. However, this is not enough to use Pyomo properly. In the case of ipopt solver, it returns the error No executable found for solver 'ipopt'. To overcome this error, we need to search the exe file of ...

1

I think it is not easy (at least for me) to formulate the deviation part, so let's omit it... Let decision variable $b_i = 1$ if $x_i$ is chosen, otherwise $b_i = 0$. The mean value is defined by $$\sum b_i \bar{X} = \sum b_ix_i.$$ To vanish the bilinear term, introduce new variables $y_i$, to ensure $$y_i = b_i\bar{X},$$ introduce constraints -Mb_i \... 6 For asymmetric TSP, you can use a directed graph, with variables x_{i,j} for i \not= j, and the flow balance constraints are: \begin{align} \sum_{j \not= i} x_{i,j} &= 1 &&\text{for all i} \\ \sum_{j \not= i} x_{j,i} &= 1 &&\text{for all i} \\ \end{align} For symmetric TSP, you should use an undirected graph, with variables ... 7 So you are dealing with a configuration where for any path A-B-...-Z, the reverse path Z-...-B-A is also valid. To break this symmetry, you can impose that the index of node A must be smaller than the index of node Z: x_{i0} \le \sum_{j| j\le i}x_{0j}\quad \forall i  This way, if arc $(i,0)$ enters the depot, then there must be a lower indexed ...

2

The proposed method is standard gradient descent with a reordering of the computation. I doesn't change anything for memory use, since there is no need to keep every element of the sum in memory anyway. Explained differently, the strength of SGD is to take multiple steps with partial information. Your algorithm evaluates every gradient at $\theta_k$, so only ...

1

Based off on what Daniel commented: select all the edges used in any vehicle's tour that are asymmetrical group them by vehicle, collecting the count of the number of asymetrical edges in that vehicle's tour add a hard constraint that there must be at least one (=> penalize if count is zero) Alternatives: Make it a soft constraint: Add a soft ...

2

As a veteran MATLAB user, I'm horrified by some of the conventions the developers of Python chose to use. There are some inconsistencies in array notation that are very troubling. They decided to defy convention used in many other programming languages, including MATLAB, C, FORTRAN, Julia, etc. Matrix manipulation is extremely difficult and prone to error in ...

4

I am not a search engine, if you would search for "dynamic facility location problem" you would for example find this book for free. Chapter 15 covers multiple formulations from the literature and describes them.

3

One traditional method to linearize multi-linear/polynomial constraints are McCormick envelopes, which are refined over time. Here is a great resource on those. A single objective solver that uses them and improves them in an interesting way is Alpine to get an quick idea whether you could adapt ideas from it for you i would recommend this 22 minute ...

5

Your last example, is certainly not that interesting. Let $f_1(x)$ and $f_2(x)$ abe the objective functions. From multi-objective optimization theory it is well known that if we use strictly positive weights for the objectives and solve the corresponding weighted sum scalarization, any optimal solution is efficient. In this case, we choose weight vector \$\...

2

A short look into the literature shows that mixed integer multi objective algorithms are still in an early stage with people proposing different formulations and approaches. I am not aware of any open solvers that could be readily used even outside the R ecosystem. So i see multiple options for you: Weighted sum approach and use the package GA as prubin ...

0

Your question title mentions "evolutionary algorithm", so (a) I assume you are comfortable with a heuristic solution and (b) I assume you have some familiarity with evolutionary algorithms. There is an excellent genetic algorithm package for R, named GA. I think there may be a few other genetic algorithm packages for R, but this is the only one ...

Top 50 recent answers are included