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
0
votes
1 answer

Resource allocation problem with mystic yields suboptimal solution

Consider the notation and objective below for this sequential resource allocation problem: Spend/Cost timestep i channel j: C_{i, j} Total resource: B Horizon: H Max allocation jump between time-steps: 1 / 0.4 Minimum allocation :…
jakob
  • 23
  • 4
0
votes
1 answer

Simple constrained optimization problem with mystic gives suboptimal results and violates constraints

I am working on a optimization problem and am wondering why the solution is so far from optimum. As a part of it i made the objective function much easier so it is easy to analytically tell where the solver should allocate more resources: in this…
0
votes
1 answer

Matrix Trace Minimization Problem using optimization method/solver

Is there any optimization method/solver in mystic or scipy.optimization library that solves the problem in the matrix domain. In other words, is there any optimization method/solver that accepts matrix as an argument and minimizes its trace?
0
votes
0 answers

Differential evolution doesn't give back the global Minimum

I am trying to find the global minimum of the Sum of Squared Differences which contains five different parameters x[0], x[1], x[2], x{3], x[4] coming from an affine transformation of data. Since I have a lot of data to compare the…
0
votes
1 answer

Implement constrained optimization problem in Mystic

Is it possible to implement the following problem in mystic? The problem minimizes a sum of squares between two (10000 by 40) matrices: Σ(X-A)^2 where X is a concatenation of four matrices (10000 by 10) and each segment is weighted (W) individually.…
0
votes
0 answers

How to pass a list of lists (N-Dim array) as an argument to the objective function in mystic differential evolution solver?

I have created an objective function for mystic differential evolution which looks something like this - import mystic from mystic.penalty import quadratic_equality,quadratic_inequality,linear_equality from mystic.solvers import diffev2 from…
0
votes
1 answer

constrain f(x) with g(x) when minimizing f(x) in mystic?

Hi I am new to mystic so I apologize if I ask similar questions that have been answered before. Say I have an input x (a list of length n), and a function f(x) that will map the input to a m-dimensional output space. I also have a m-dimensional…
0
votes
1 answer

How to properly generate constraints for array equations in mystic?

I have an optimalization problem where I want to minimize the quantity -sum(p log(p))dx (entropy) with the constraints sum(p)dx == 1 and sum(p.x)dx == 0.2, where p and x are arrays and dx is a scalar. I tried to implement this using mystic this…
mate jozsa
  • 13
  • 3
0
votes
1 answer

Minimizing non-convex function with linear constraint and bound in mystic

Say I have a non-convex objective function loss that takes a np.ndarray named X whose shape is (n,) and returns a float number. The objective has many many many local minima, since it's essentially a function of np.round(X * c, 2) where c is another…
nalzok
  • 14,965
  • 21
  • 72
  • 139
0
votes
1 answer

Using mystic to solve a parameter-dependent optimization problem

I have a non-convex quadratic optimization problem of type x' * B * x, where all entries of x are between 0 and 1 and the sum of all entries is identical to 1. In scipy.optimize I would try to solve this optimization problem via import numpy as…
Philipp Wacker
  • 253
  • 2
  • 7
0
votes
1 answer

gtol parameter issues [mystic]

I am trying to optimize a function using the mystic library in Python, and have a general question about the gtol parameter. The parameter space I'm searching in, is of high dimension (30-40), and for this reason, it seemed fitting for me to set…
xzeo
  • 147
  • 4
0
votes
0 answers

Python Linear or Quadratic Optimization with Row & Column Level Constraints

I am looking for a maximizing optimization solution that fulfills row-level and column-level constraints given a matrix of inputs. Given 3 stores (A, B, C) and 3 products (X, Y, Z), optimize the placement of 1,200 units of inventory (X = 600, Y =…
0
votes
1 answer

Why when using Mystic in Python to optimise a non linear constrained optimisation do I receive a 'cannot simply inequalities' error?

I am trying to optimise the problem below using Mystic. I am currently receiving an error that I don't understand and was hoping someone more familiar with the library could help. def objective(x): x0,x1,x2,x3,x4,x5,x6,x7,x8 = x return x0**2…
0
votes
1 answer

Putting integer constraints in mystic

I am new to mystic and working on an optimization problem.My mystic code looks like this: def find_loss(e,lmd,q,k): edge_pmf=find_final_dist(e,lmd,q) l_e=sum(edge_pmf[k+1:]) return l_e def objective(x): s=0 for i in…
0
votes
1 answer

Mystic for non-convex MINLP

Can mystic optimizer be used to minimize a non-convex Mixed Integer Non-Linear Programming problem with only integer inputs?Because,the objective function is not continuous in x(the input),it is discretized in integers.