Community Profile

# Alan Weiss

### MathWorks

1.897 total contributions since 2011

I write documentation for MATLAB mathematical toolboxes, primarily optimization. I have also written documentation for PDE, statistics, symbolic math, and econometrics.

My pre-MathWorks job was with Bell Labs, primarily in mathematical models of data traffic, with a strong interest in parallel computation and in rare events (large deviations).

I do not provide private consulting. If you have a question, please ask on a public forum such as MATLAB Answers.

View details...

Contributions in
View by

How can I set meshsize respectively for each parameter on patternsearch?
Usually it is better to set the scale within your objective function so that the optimization parameters are all of the same ord...

ein Tag ago | 0

| accepted

How can I make patternsearch optimize using additional values?
Before I get to your specific question, allow me an observation: it is very inefficient to call a load statement in an objective...

ein Tag ago | 0

“crossover or mutation” strategy versus “crossover and mutation” strategy
I cannot answer why the toolbox has the design it has. However, you are certainly ALLOWED to use any strategy you want. For exam...

4 Tage ago | 0

Excel add in problem with INTLINPROG function
Sorry, the major change I know about occurs in R2019a (see Functionality Being Removed or Changed). I don't know how to help you...

5 Tage ago | 0

How to use GA when a BIG problem only has integer variables?
It is unlikely that you will get an effective genetic algorithm solution here. Use intlinprog to solve MILP problems, possibly a...

5 Tage ago | 0

Comparison of acquisition functions in bayesian optimization
I am not an expert in this area, but I'll tell you what I know about acquisition function types. From what I understand, in inte...

5 Tage ago | 0

| accepted

Multi Objective Multi Reservoir Optimization (NSGA II) Formulation
I think that you are confusing yourself by using symbolic math. What might be worthwhile is to write this using the problem-bas...

5 Tage ago | 1

Sir how to write objective function for this in particle swarm optimization algorthim
I suppose that you know how to write code to calculate and . I suppose that you know how to write code to calculate the sum mul...

6 Tage ago | 0

| accepted

patternsearch optimization with parallel computing and multistart
See the documentation examples Parallel MultiStart and Optimize an ODE In Parallel. Or just look at the Parallel Computing sect...

6 Tage ago | 0

Genetic Algorithm for differential equation parameter identification
Firstly, the code did not work as you gave it. The function you labeled as myfun2 should have been labeled myfun3. Secondly, yo...

6 Tage ago | 0

| accepted

Optimization problem: matlab inbuilt function "getIpOptions" generates an error in fmincon
You are trying to maximize utility, so you should minimize the negative of the utility. The following code runs without error fo...

6 Tage ago | 0

| accepted

How to get fzero to work on an array?
I don't know if this is what you wanted, but I got it to work by making a loop for fzero: x = .2:.1:.6; r = .3 + 3.*((x-.5).^2...

11 Tage ago | 0

How to formulate GA with plenty variables (e.g >24000 variables)
It seems that you have thousands of binary variables. If so, then indeed ga is not an effective solver for your problem. You wo...

11 Tage ago | 0

How to do curve fitting to a custom function with 7 fitting parameters?
There are examples related to this in Nonlinear Data-Fitting and possibly Fit an ODE. Alan Weiss MATLAB mathematical toolbox d...

11 Tage ago | 0

fmincon converges to initial value
I haven't looked at your problem in detail, but I suppose that the issue is related to those found in Optimizing a Simulation or...

11 Tage ago | 0

bayesopt with equality and inquality constraints
I believe that you have two errors in your formulation. As explained in Constraints in Bayesian Optimization, bayesopt attempts ...

18 Tage ago | 1

How to choose DiffMinChange value?
I suggest that you look at When the Solver Might Have Succeeded. In particular, https://www.mathworks.com/help/optim/ug/when-the...

18 Tage ago | 1

Solve optimization problem that iterates on parameters with constraints defined with numerical solutions to differential equations depending on those parameters
Perhaps the example Fit an Ordinary Differential Equation (ODE) can help. Alan Weiss MATLAB mathematical toolbox documentation...

18 Tage ago | 0

| accepted

Change the range of potential hyperparameters when optimizing hyperparameter choice using fitrensemble
Looking in the documentation for fitrensemble I find this: ---- Set nondefault parameters by passing a vector of optimizableVa...

18 Tage ago | 0

| accepted

help me to use a gamu/pareto to solve an optimization problem
Your three objective functions are t(1)(x(1) - x(4)),..., and your second condition contains the equations t(1)(x(1) - x(4)) = 0...

25 Tage ago | 0

Only feasible point for intlinprog
Sure, you are free to use the built-in 'savemilpsolutions' output function to collect the solutions, and eiither give a random o...

25 Tage ago | 1

Multi Objective Optimization with discrete variables ?
Yes, if you are careful to define the creation, mutation, and crossover functions so that all integer variables are integers, an...

25 Tage ago | 0

| accepted

how can I get 5 parameters in using the optimization tool of an equation
I would not write the sum of squares explicitly. Instead, formulate your problem as an EquationProblem and solve that. You can h...

25 Tage ago | 0

How I can solve multivariable optimization problem without Optimization toolbox?
I would solve this in a loop for X = 0, X = 1,..., X = 10. Alan Weiss MATLAB mathematical toolbox documentation

25 Tage ago | 0

Fsolve - Equation solved, inaccuracy possible.
I think that you might be going about this the wrong way. If you want to solve an ODE numerically, usually you should use ode45 ...

25 Tage ago | 0

Optimization problem with intlinprog
You see in the iterative display that the number of integer solutions is reported to be 0. That means that intlinprog did not ye...

etwa ein Monat ago | 0

| accepted

how to solve a deflection problem in pavement surface using genetic algorithms.
There are many ways to solve such model-fitting problems. See these examples: https://www.mathworks.com/help/matlab/math/exampl...

etwa ein Monat ago | 0

| accepted

fminunc stopped because it cannot decrease the objective function along the current search direction.
Please run with the CheckGradients option set to true. I think that you will find that you did not calculate the derivatives cor...

etwa ein Monat ago | 0

| accepted