mathematical-optimization

Multiaxis System of Equations Optimizations in Python

Multi-axis equation optimization Question: Optimize value of O_t based on each value of L_t from 1 to 240 according to below equations: O_t = O1+O2+O3+O4 O1= LS1+3×D O2=3×LS2+4×S O3=S+3×D O4= LS4×4+7×D L_t = LS1+LS2+LS3+LS4+LS5+LS6 L_t = (S+D)/5 Desired outputs: Values of S, D, LS1, LS2, LS3, LS4, LS5 and LS6 that result in highest possible …

Total answers: 3

Schedule Optimization Question – Variant of Job Shop

Schedule Optimization Question – Variant of Job Shop Question: I am looking to build code on python for a variant of the job shop problem. The differences are: The goal is to combine as many tasks to the fewest number of machines without overlap while ensure the most efficient outcome The machines have a capacity …

Total answers: 1

Meal plan algorithm closest to x calories with types

Meal plan algorithm closest to x calories with types Question: I have a problem where I need to generate a meal plan with: x number of meals per day (eg. 5) x number of meal types in the plan (eg. 2 breakfasts, 2 snacks and 1 lunch) Number of calories in meal plan (eg. 2000) …

Total answers: 1

Global minimum versus local minima solution with Python Gekko

Global minimum versus local minima solution with Python Gekko Question: A simple optimization example has 2 local minima at (0,0,8) with objective 936.0 and (7,0,0) with objective 951.0. What are techniques to use local optimizers in Python Gekko (APOPT,BPOPT,IPOPT) to find a global solution? from gekko import GEKKO m = GEKKO(remote=False) x = m.Array(m.Var,3,lb=0) x1,x2,x3 …

Total answers: 2

Find the value of a variable that maximizes a multivariable function

Find the value of a variable that maximizes a multivariable function Question: I have a function like this: def objective(x, y, z, q): theta1 = f(x, y) theta2 = f(x, z) rho = q – (theta1 + theta2) return rho * x and I would like to find the value of x that maximizes the …

Total answers: 1

How to fill the bigger square with smaller squares effectively?

How to fill the bigger square with smaller squares effectively? Question: I need to write in python3 a function that fills the bigger square with smaller squares basing on the input. The input is a list of positive integers. Each integer is the number of squares per row. So the list [3, 8, 5, 2] …

Total answers: 3

Optimal combination of linked-buckets

Optimal combination of linked-buckets Question: Let’s say I have the following (always binary) options: import numpy as np a=np.array([1, 1, 0, 0, 1, 1, 1]) b=np.array([1, 1, 0, 0, 1, 0, 1]) c=np.array([1, 0, 0, 1, 0, 0, 0]) d=np.array([1, 0, 1, 1, 0, 0, 0]) And I want to find the optimal combination of …

Total answers: 1

Constraint 'feasibility_cut[1]' does not have a proper value. Found 'True'

Constraint 'feasibility_cut[1]' does not have a proper value. Found 'True' Question: I’m new to python and pyomo, so I would kindly appreciate your help, I’m currently having trouble trying to add a constraint to my mathematical model in Pyomo, the problem is while I try to add the "feasibility_cut", it says "Constraint ‘feasibility_cut[1]’ does not …

Total answers: 1