Questions tagged [mystic]

Use this tag for questions that involve the Python Mystic optimization framework.

Mystic is a Python framework that provides optimisation algorithms and tools.

50 questions
1
vote
3 answers

Optimization with joint bounds / symbolic constraint

I am trying to perform least squares optimization on a vector [a1,a2,a3], with the following constraint, where k is a constant: -k < a3/a2 < k I will post a simplified version of my code in the hope that this makes it clear enough what I am…
1
vote
2 answers

Variable placeholder in mystic constraints

Is there some way to use variable names in mystic constraints? i.e. equations = ''' abs(x0 - init_velocity) <= acceleration_constraint abs(x1 - init_heading) <= turning_constraint ''' The above causes this error: Traceback (most recent call…
johnnyboy
  • 33
  • 6
1
vote
1 answer

Using mystic to solve a system of inequalities

I am trying to solve a system of simple inequalities using the Python framework Mystic. I'm solving for ten variables, these variables should all be greater than each other (x1 > x2 > x3 > ... > x10) and they should be greater than zero. I'd like…
Lennart B.
  • 11
  • 1
1
vote
1 answer

How to apply inequality constraints in Mystic

I'm trying to maximise an objective subject to an inequality constraint using Mystic but am struggling to see how to apply the penalty constraints. The problem is non-convex and involves maximising the objective where there is only one variable that…
Capeboom
  • 425
  • 1
  • 5
  • 13
1
vote
1 answer

How to find the parameter to optimize (maximize) the expected value of a function with random variable globally (using python mystic)

I'm new in asking at StackOverflow so sorry if using it in a wrong manner. I have a maximize problem in a paper just like this: and some constraints: where r_f,t+1 and γ are given constant, r_t+1 is a multidimensional random variable vector(4…
C_Yue
  • 33
  • 6
1
vote
1 answer

Find function minimum for discrete variables w/ bounds and constraints

I'm trying to find a (relatively) fast way to minimise a function on the set of natural numbers given constraints and bounds. I know the mathematical form of the function and its constraints, so a brute force approach seems slow and not very…
1
vote
1 answer

Adding linear inequality constraints in mystic

I am trying to implement a nonlinear optimisation with 16 linear inequality constraints and one linear equality constraint by using mystic for a problem with 100 variables. When I use the linear_symbolic module to create the constraints, the…
1
vote
1 answer

Optimization & Linear Inequalities with Mystic

I am working with a fairly complex objective function that I am minimizing by varying 4 parameters. A while ago I decided to use the Python framework Mystic, which seamlessly allows me to use penalties for complex inequalities (which I…
Infinity77
  • 1,317
  • 10
  • 17
1
vote
1 answer

solving a system of inequalities where the solution is infeasible

I am trying to solve the attached a non-linear optimization problem. I would like to give mystic a try, since SciPy.optimize does not work as expected (further details below). Because c_1 = 3, the problem is infeasible. This is because (p_1 - 3 -…
GregK
  • 571
  • 6
  • 15
1
vote
1 answer

Supplying a vector of inequalities/constraints to mystic

I am trying to supply constraints to a a function minimisation that I have hitherto been performing successfully with an unconstrained algorithm available via scipy (scipy.optimize.fmin_l_bfgs_b()). Reading up (see, e.g, Python constrained…
ap21
  • 2,372
  • 3
  • 16
  • 32
1
vote
3 answers

Integer decision variable in non linear programming

I would like to maximize the quotient of two linear functions. I would want my decision variables to be Binary here i.e. they have to be integers and can take values of only 0 and 1. I wanted to know how can I achieve this? I am looking to use an…
0
votes
1 answer

Trivial constrained optimization problem with mystic violates constraint and returns infinite function value

I am trying to use mystic for some constrained optimization problems, but it will not respect my constraint, even after using mystic's simplify function. I reckon I must be missing something, but I can't figure out what it is. Here is a simple…
Ken Nod
  • 1
  • 1
0
votes
1 answer

Scipy / Mystic - Constraints violated after being specified

I'm trying to optimize a 10x5 matrix to maximize a return value y, using mystic. There are 2 types of constraints that I need to include: Each element must be in between a min and max range Some elements must equal specific values (provided in a…
star_it8293
  • 399
  • 3
  • 12
0
votes
1 answer

Scipy / Mystic taking too long to simplify expression

I'm trying to use mystic to create a simplified expression of my constraints. I have an array of 200 elements. I'm first testing for 1 constraint, which is limiting the sum of all the variables between min and max limits like this: 0 <= x0 + x1 + x2…
star_it8293
  • 399
  • 3
  • 12
0
votes
1 answer

Scipy Optimise with Mystic - constraint keeps getting violated

I'm trying to optimize a 52x5 matrix to maximize a return value y. I first flatten the matrix into an array of 260 elements, then apply Scipy optimize and mystic. However, the max_limit constraint keeps getting violated? Please see the main part of…
star_it8293
  • 399
  • 3
  • 12