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
4
votes
3 answers

Algorithm for maximizing shipping profit with limitations on mass and cost

The title isn't very helpful, because I'm not sure what I'm trying to say exactly. I'm sure an algorithm for this must exist, but I can't remember. Note: not a homework problem, I finished school a very long time ago. So here's the problem: We're…
Jordan
  • 3,998
  • 9
  • 45
  • 81
4
votes
1 answer

Non-convex optimization with linear constraints

I'm trying to solve an optimization question similar to the toy example described below. As noted in the comment, my current implementation with scipy is too slow and doesn't seem to converge. How do I get a decent solution? You can use scipy,…
nalzok
  • 14,965
  • 21
  • 72
  • 139
3
votes
1 answer

How do you constrain more than 10 variables at a time using Mystic?

I'm trying to constrain an overall budget using mystic, where each individual x has an associated function that is ultimately being maximized. I have set bounds such that each individual spend can only go up or down at a maximum of 30%. I am not…
JBrack
  • 31
  • 2
3
votes
1 answer

Can mystic solve black box optimization problems with constraints?

I would like to know whether constrained blackbox optimization is possible using mystic in python. If so what algorithms will be available in this optimization package?
Sreenath
  • 51
  • 3
3
votes
2 answers

Maximize sum subject to conditions in Python mystic

I am trying to build an implementation of a white paper on Dynamic room pricing model for hotel revenue management systems. In case this link dies in the future, i am pasting in the relevant section here: My current implmentation thus far is quite…
deweydb
  • 2,238
  • 2
  • 30
  • 37
2
votes
2 answers

Avoiding to evaluate expensive function in targetpenalty that already been evaluated in cost (mystic optimization package python)

I have an very expensive to evaluate function that needs to be computed in both the cost and targetpenalty in an optimization problem i am facing. I was wondering if there is a workaround here? Consider the code below highlighting the issue - this…
jakob
  • 23
  • 4
2
votes
1 answer

How do I create a constraint using a linear symbolic inequality in Mystic?

I am trying to use Mystic to minimize a nonlinear function with linear constraints. As a simple example, I have the following: import numpy as np import mystic.symbolic as ms from mystic.symbolic import generate_constraint from mystic.symbolic…
Max Candocia
  • 4,294
  • 35
  • 58
2
votes
1 answer

How to specify multiple constraints in function form in Mystic?

How do you input multiple constraints in using the Mystic solver? For instance, I have these two functions which describes my two constraints: def constraint1(x): return x[0]*x[1]*x[2]*x[3]-25.0 def constraint2(x): sum_eq = 40.0 for i…
warrented
  • 23
  • 2
2
votes
1 answer

Constrained global optimization tuning [mystic]

Background Auto-tuner for a car application: The application may change depending on model of the car, so naturally the objective function is going to change as well. The problem is to tune the parameters to the optimum ones for the specific car…
vsk
  • 23
  • 1
  • 4
1
vote
1 answer

Mystic lib differential evolution optimiztion algorithm settings

I have tried to optimize smooth objective (cost function) with tough non-linear constraints using diffevo algorithm. And I cant understand how to define such parameters as: constraints, bounds and init vectors. My obj - just a sum of budget: def…
1
vote
0 answers

Modeling separable NON-CONVEX constrained optimization problem in CVXPY

I have an optimization problem that I'd like to solve in python. The objective function is NOT convex everywhere. I thought I'd use CVXPY, but any other package in python is welcome. Here is the problem: Minimize p(x_1) + p(x_2) + ... +…
1
vote
1 answer

'cannot pickle 'PyCapsule' object' occurring with Mystic diffev2

I am trying to optimize some inputs to a third party software. This software utilizes a series of input files that are created by separate executables and are then merged together into a single input file for the primary executable. The goal is…
1
vote
1 answer

Penalty function for nonlinear inequality constraints in Mystic are evaluated outside of bounds

I would like to use mystic solver to solve the following nonlinear optimisation problem with nonlinear constraints. Here the code: import numpy as np import matplotlib.pyplot as plt from math import sqrt from mystic.solvers import diffev2, fmin,…
Daniel
  • 1,522
  • 1
  • 12
  • 25
1
vote
1 answer

Compiling hard constraints with Mystic optimisation

I am writing a constrained integer optimization and am having trouble with formulating constraints. Here is a summary of my optimization: (Schedule is my own function that returns a single int value) Objective: MIN (1500 * x1) + (625 * x2) +(100 *…
Alison Luo
  • 13
  • 2
1
vote
1 answer

Differential evolution algorithm different results for different runs

As the title says, I am using the Differential Evolution algorithm as implemented in the Python mystic package for a global optimisation problem for O(10) parameters, with bounds and constraints. I am using the simple interface diffev result =…
Saladino
  • 121
  • 3
1
2 3 4