# Questions tagged [constraints]

The tag has no usage guidance.

45 questions
Filter by
Sorted by
Tagged with
4k views

### Nonlinear least squares with box constraints

What are recommended ways of doing nonlinear least squares, min $\sum err_i(p)^2$, with box constraints $lo_j <= p_j <= hi_j$ ? It seems to me (fools rush in) that one could make the box ...
3k views

### Markov (Chain) image generators?

Markov Chains can be used to generate, or auto-complete, text. https://en.wikipedia.org/wiki/Markov_chain#Markov_text_generators Training text is read, and some information about the text is ...
5k views

### How to get all intersections between two simple polygons in O(n+k)

Basically the formulation of the problem I'd like to solve is very simple. Given 2 simple polygons (without self-intersections) report all intersecting edge pairs in O(n+k) time, where n - is a total ...
697 views

### Constrained simulated annealing

Simulated annealing is a useful technique for finding near-optimal solutions to combinatorial problems. I have found a lot of tutorials on implementing the basic algorithm, but miss a general guide as ...
1k views

114 views

### What's the best way to handle a quadratic constraint

What is the best way to handle a constraint of the type $ax_1^2+x_2^2+...+x_n^2=c$ in a gradient descent algorithm? I would like to solve an optimization problem of the type: $$\min J(x_1,..,x_n)$$ ...
582 views

### Linear constraints for L-BFGS-B

I know L-BFGS-B only supports simple box constrains of the form: $l_i \leq x_i \leq u_i$, where $l_i$ and $u_i$ are constants. For my specific optimization problem, I need to specify some simple ...
128 views

### How does constraint resolution affect the stability/accuracy of numerical integration?

I understand some basic analysis techniques (local truncation error, global error, zero-stable, absolute stable, etc.) of numerical integration. But I find it hard to apply these techniques in ...
363 views

### How much better a bounded BFGS is compared to augmented Lagrangian method with BFGS?

I mean, in handling boxed constraints? In terms of stability, and more importantly, the numerical performance? I have already written some well-optimized and well-tested C/CUDA/C++ codes for ...
162 views

### How to impose a constant constraint PDE

What is the best way to impose a "constant constraint" for a PDE? Specifically, I want to solve an eigenvalue problem $Au=\lambda u$ on the rectangle $(0,2\pi)\times(-\pi/2,\pi/2)$ with periodicity ...
40 views

### Constraints 'exactly/at most one non-zero element' without binary variables

In a much larger MINLP problem, I have set of variables $\{a_{ij}\}_{m,n}$, such that $0 \leq a_{ij} \leq 1$ for all $i$, $j$, which I could think of as a matrix, for which I have two requirements: ...
1k views

### Simple methods for solving 2D steady incompressible flow?

I'm trying to make a CFD model where I can place a source and a sink anywhere in a grid and get the fluid flow rate across each cell boundary between those locations. I'm starting simple with a 3x3 ...
1k views

### Quadratic program With Linear Constraint vs. Eigen Decomposition Time Complexity-Comparison. Which is faster?

Say I had the choice of choosing one out of the following two optimization problems which I could use to solve my problem. Which choice is the fastest? How much of a trade-off would it be-as in - Is ...
72 views

### Hanging nodes in deal.ii tutorials: how is the continuity constraint imposed?

While looking at step6 of deal.ii tutorials, I decided to try to understand how the constraints coming from hanging nodes are imposed. So I started by watching video lecture 16 by prof. Bangerth As ...
30 views

### Differences in using Clausius-Duhem inequality vs Principle of Virtual Work/Power in derriving constitutive equations?

I am a novice getting my toes wet in continuum mechanics and nonlinear elasticity. I have seen papers that use both approaches in developing constitutive connections to compliment balance equations of ...
371 views

### What is the mathematical and physical principle behind of RBE2 element？

I am writing a 3d linear finite element code to solve the standard linear elasticity equation on a tetrahedron mesh of a gearbox. Notice that, the two rectangular plates above the gearbox are fixed, ...
30 views

805 views

### Solve integral equation for unknown constant

Consider the equations $$\int_0^L \mathbf W(\mathbf u, s) \, \mathrm ds = \mathbf 0$$ where $0 \leq s \leq L$ and $\mathbf u$ is a vector of constants. Numerically, what is the best way to ...
906 views

### Defining a soft constraint in cvxpy

I am using cvxpy to do a simple portfolio optimization. I implemented the following dummy code ...
93 views

### Constraining the total volume in Finite Element Methods

I have a diffusion problem which can be broken down to be: $-\Delta u = f(u)$ on $\Omega ~/~ \Omega_{int}$ $u = 1$ on $\Omega_{int}$ Note that this is an internal Dirichlet constraint to the ...
I am implementing an optimization problem using semi-definite approach. One of my constraints is of following form $trace(A∗X)−(k∗trace(A∗X))+(k∗\sqrt {(trace(B∗X)} )==0$ where k is a constant, A ...