533 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
104
views
Fixed Point Iteration Optimisation Problem
I have to solve this problem using fixed-point iteration. I have tried but I am having different solutions depending on the initial condition of y12.
Can someone help me? Also, the initial idea was ...
1
vote
1
answer
71
views
Scipy Minimize throwing bounds error when constraint is added
I am trying to optimize a matrix given some bounds and constraints. When I run the minimize function with only the bounds everything works fine, but when adding the constraints I get the following ...
2
votes
1
answer
53
views
Writing an independent routine to add a minimization constraint in solnl()
I need to find a way to write an independent routine to add a particular constraint to a minimization problem in solnl()
With a concrete example, one has this
##### for optimization
library(MASS)
...
1
vote
1
answer
44
views
Why constrained minimization fails in python
I'm trying to numerically solve some mechanism design question using the following code. However, the output is not optimal(just stay at my initial guess). How should I make it work?
I tried different ...
0
votes
0
answers
40
views
is this Hopcroft minimization algorithm variant incorrect?
I am supposed to make a library for manipulation with DFA and one of the operations is minimization, in my research I stumbled upon this algorithm in one of the material published by rice university ...
0
votes
1
answer
396
views
Fitting a Generalized Pareto Distribution (GPD)
I am trying to fit a GPD in python. Standard genpareto.fit from scipy works, however I would like to get parameter error (sensitivity) and unfortunately it is not provided. When I try to fit the GPD ...
1
vote
2
answers
84
views
Python vectorized minimization of a multivariate loss function without jacobian
I have a loss function that needs to be minimized
def loss(x: np.ndarray[float]) -> float
My problem has nDim=10 dimensions. Loss function works for 1D arrays of shape (nDim,), and with 2D arrays ...
0
votes
1
answer
337
views
Scipy.optimize.minimize returns `Desired error not necessarily achieved due to precision loss.` for a toy problem
import numpy as np
from scipy.optimize import minimize
np.random.seed(42)
nDim = 24
xBase = np.random.normal(0, 1, nDim)
x0 = np.zeros(nDim)
loss = lambda x: np.linalg.norm(x - xBase)
# loss = ...
1
vote
3
answers
198
views
Suggestion on which constraint to adds to optimize Minizinc's model
I've recently started using Minizinc to solve this simple problem:
Problem definition:
I have grid of dimensions H and W of boolean variables. The only constraint is that if a variable is false then ...
0
votes
1
answer
366
views
Correct code to do golden section search over integers
I have an expensive function f which is unimodal and I want to find its minimum. However f is only defined at integer values. I read that golden section search is the right thing to do. My ...
0
votes
1
answer
130
views
How to make python code fast for minimization?
The following code for minimization of a mechanical system works with no error.
However, it is slow and to me there are unnecessary steps or loops that make it heavy!
Would you make comment, and ...
0
votes
0
answers
43
views
cvxpy - cp.Minimize giving no answer
I'm trying to get the expected returns that satisfies a set of known weights, asset covariance, a set of weight limits and an estimated risk aversion. I'm using cp.Minimize to solve the problem. But ...
0
votes
0
answers
115
views
Minimizing a function of a 2d array
I have a free energy density function that I have to minimize. The function looks as follows,
f = 1/2*(k1 sin^2 theta + k2 cos^2 theta)*(del theta/del x)^2 + 1/2*k3*(del the*ta/del z)^2 - 1/2*sin^...
0
votes
1
answer
93
views
How to minimize problem using Pulp when the parameter to minimize is evaluated using a function?
I have a class that evaluates a result for a given input list of parameters. I would like to know the best set of parameters that minimises the result given by the class. Since the input must remain ...
0
votes
1
answer
67
views
Fastest minimization algorithm to define optimal network
I have a large set of clients, and each of them have an id. They are related to each other by the column "Value", see below:
import pandas as pd
import numpy as np
# Example with 7 clients
...