Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [constraints]

The tag has no usage guidance.

1
vote
0answers
68 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 ...
1
vote
1answer
68 views

sum of absolute difference constraint in optimization problem

I am writing a model for an optimization problem. I need to write the following constraint: $$\sum^{N - 1}_i \lvert (a_i - a_{i+1}) \rvert \leq 2\, .$$ How to write this constraint (or linearize)? ...
-1
votes
1answer
22 views

Semi-Definite relaxation of non-linear constraint?

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 ...
1
vote
0answers
103 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, ...
2
votes
0answers
25 views

Domain for convex perspective function

The perspective of a function $f : \mathbb{R}^n \to \mathbb{R}$ is the function $g: \mathbb{R}^n \times \mathbb{R} \to \mathbb{R}$ where $g$ is defined as $$g(x,t) = tf(x/t)$$ with $$\mathbf{\text{dom}...
2
votes
1answer
28 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: ...
0
votes
1answer
365 views

Defining a soft constraint in cvxpy

I am using cvxpy to do a simple portfolio optimization. I implemented the following dummy code ...
1
vote
2answers
69 views

Making difference of log constraints convex

I have the discrete likelihood estimation problem $\max \sum m_i\log p_i $ where $m$ is a given vector of length $n$. The constraints are $0 \preceq p \preceq 1$, $\sum_{i=1}^n p_i = 1, $ and one ...
4
votes
1answer
244 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 ...
5
votes
1answer
119 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 ...
1
vote
1answer
306 views

Trajectory optimization for smoothness

I want to achieve the following in 2D (and without obstacles): Given start position A and end position B, generate the path between the two points that optimizes a cost function that depends on total ...
1
vote
0answers
156 views

the augmented global stiffness matrix is not positive semi-definite using Lagrange Multipliers method within FEM

The augmented global stiffness matrix is not positive semi-definite when using Lagrange Multipliers method to enforce boundary constraints on a simple square domain of integral form: I am considering ...
6
votes
1answer
780 views

Newton's method with box-constraints

I have to use an iterative method (Newton-Raphson, modified Newton and Broyden) to solve a system of nonlinear equations $f(x)=0$. Every unknown $x_i$ is bounded between $l_i$ and $u_i$, i.e., $l_i<...
1
vote
1answer
95 views

Eigenvalue problem constrained with a penalty method

I am trying to constrain an eigenvalue problem. I am aware of the method utilizing the nullspace of the constraint vectors but I was wondering if it would be to use a penalty method for the same ...
2
votes
4answers
647 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 ...
0
votes
1answer
291 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 ...
0
votes
1answer
272 views

FEM, Direct Stiffness Method with a nonlinear displacement constraint in one node

i have a question about a FE problem im working on. I made a finite element model of an linear elastic block of material (double striped block) attached with a rigid connection to the environment (...
5
votes
1answer
54 views

Projection on Stiefel manifold after integration step

A few days ago, I asked how constraints like $A^T A = I$ can be implemented if one wishes to integrate differential equations of the form $\dot{A}=f(A,t)$. Kirill was so kind to point out that a ...
7
votes
2answers
1k 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 ...
4
votes
1answer
117 views

Integration of differential equation with orthogonality constraint

Lets say I have a system of differential equations which has the form $$\dot{C}_{\alpha,\beta,m} = f_{\alpha,\beta,m}(C_{\alpha,\beta,1},\ldots,C_{\alpha,\beta,N};t).$$ The $f$s are some functions of ...
4
votes
2answers
259 views

Prescribe solution of a PDE at specific points

I am using MATLAB's PDE toolbox to solve the differential equation $-\nabla\cdot\left(c(x)\nabla u(x)\right) + a(x)u(x) = f(x)$ The particular problem in question is an electrostatic problem, but ...
1
vote
0answers
169 views

Maxwellian distribution of velocities with Shake algorithm present

I am writing a code to perform hybrid monte carlo molecular dynamics. To do this, I need to have a code to initialize the velocities of all particles according to a maxwell distribution. The code is ...
1
vote
1answer
134 views

Minimization constraints without using Lagrange Multiplier

Currently, I am working on an unconstrained energy minimization function, but I need to add some constraints. My system is a 2D lattice with a force applied to it, and I want the sides to be able to ...
1
vote
0answers
47 views

Numerical Implementation of “integrates to some values” type constraint in convex solvers?

I am maximizing a linear functional subject to an integrates to one constraint. More explicitly, my problem is $$\begin{align} &\max_{x \in \mathbb{R}^n}\quad c \cdot x\\ &\text{subject to} \...
1
vote
1answer
960 views

Convex Polygon Intersection

Determining the intersection of two convex polygons is one of the fundamental problems in computational geometry . I'm asking for an algorithm having: INPUT: Given two convex polygons P and Q in 2D (...
3
votes
2answers
116 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 ...
4
votes
1answer
398 views

Transform from constrained to unconstrained optimization

In a constrained optimization problem, I found in a paper a way to define new variables such that the constraints disappear. They only give the new variable definitions, and I would like to understand ...
2
votes
0answers
80 views

About Convex Geometry

A consistency notion in constraint programming: Let $P = (X, D, C)$ be a CSP. Given a set of variables $Y \subseteq X$ with $|Y| = k -1$, a locally consistent instantiation $I$ on $Y$ is $k$-...
3
votes
1answer
931 views

solving a linearly-constrained sparse linear least-squares problem

[ question reposted from https://math.stackexchange.com/questions/786612/solving-a-linearly-constrained-sparse-linear-least-squares-problem ] Given the system of equations $Ax=b$, subject to $Cx\le ...
2
votes
2answers
142 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 ...
3
votes
1answer
87 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)$$ ...
3
votes
0answers
289 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 ...
3
votes
1answer
586 views

BFGS methods for constrained elasticity problems

My dear community, I am wondering why BFGS methods are not so widely used for simulating mechanical problems which heavily still relies on inverting the hessian matrix. I am essentially interested ...
2
votes
2answers
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 ...
6
votes
1answer
3k 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 ...
5
votes
2answers
456 views

What does symmetrize mean? (imposing multifreedom constraints to stiffness matrix)

I have a small FEM implementation program. And I want to add imposing multifreedom constraints (MFC) feature to it. The theory of master-slave method is given here (page 10 for general case). ...
5
votes
2answers
319 views

Linear regression with quadratic constraints

What methods are suggested to solve problems of the form $\min || {A} x - y ||_k$, subject to $x^T P x \leq c$, and/or $x^T Q x = d$?
10
votes
4answers
3k 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 ...
4
votes
1answer
544 views

What is the probabilistic model behind sudoku grids?

I'm talking about the vanilla sudoku game, with 9x9 grids equally split into 9 regions. I've tried a few approaches to estimate the probability that a specific number is in a specific location, but I ...