r/optimization

▲ 2 r/optimization+1 crossposts

How do you optimize a system while preserving an unknown function? (Optimization, Machine Learning, Evolutionary Computation, Control Theory, etc.)

I'm trying to abstract a biological problem into a more general computational problem, as I'm interested in the underlying methodology used in this fields, to ideally translate back to biology.

The core challenge is that I want to modify a system while preserving a desired behaviour in one context, but allowing that behaviour to change in other contexts. The difficulty is that I don't know which internal parts of the system are responsible for preserving the desired behaviour.

A simplified example:

  • We have a system (algorithm, function, circuit, program, etc.).
  • The system operates within different contexts/environments.
  • In Context A, it must produce a desired output.
  • In Contexts B, C, D..., it should not produce that output.
  • The context may interact with or modify any part of the system.
  • We are free to modify the system itself.
  • The system can be enormous in complexity, but ideally is optimized for minimimum required complexity that might scale with the number of contexts.
  • The contexts can also be enormous in complexity and interact with the system in many ways.
  • Some internal components are essential for producing the desired output in Context A.
  • Other components are free to change.
  • The problem is that we do not know which components are essential and which are not.
  • We can only evaluate the system by observing its behaviour in each context.

Are there existing computational methods that tackle this type of problem?

reddit.com
u/jackavix — 6 days ago

Picker routing

Let’s consider the warehouse of a 3PL logistics company. There is a route optimization project aimed at minimizing the walking distance for pickers who gather orders, and I need to code it in Python. However, there are some areas within the warehouse that are impassable, such as columns, fire extinguishers, and stairs/elevators. In your opinion, in what data format should I provide these obstacles to the optimization model? A graph-based approach seems like the best option, but I’m not sure how to model the physical obstacles. Because these workers won’t be able to navigate around these physical obstacles, and I’ll need to map out a walkable path so that I can optimize the routing along that path based on the locations of the orders on the work list. Does anyone have any ideas? There are about 2,000 items on a single job list, and the workers pick up the orders using large hand carts, similar to shopping carts. For such a large-scale optimization problem, should I try heuristic methods or other approaches like MIP, MILP, etc.? I’m open to suggestions.

reddit.com
u/Strict_Cable_6046 — 6 days ago
▲ 17 r/optimization+2 crossposts

Solving NP-hard portfolio constraints with Simulated Quantum Annealing (PyTorch)

Adding real-world constraints—like sector caps or HHI concentration limits—turns standard portfolio optimization into an NP-hard Mixed-Integer problem. Traditional solvers quickly hit a computational wall as the asset universe scales.

To bypass this, I built a Quantum-Inspired Optimizer that maps continuous allocation weights and structural constraints into an Ising Hamiltonian framework using PyTorch. Instead of deterministic branch-and-bound, it uses simulated thermal annealing to navigate the complex energy landscape, treating constraint violations as physical "friction" to settle into a strictly compliant ground state.

Full architectural breakdown and a video of the live Streamlit UI in action here: Link

u/Appropriate-Bar-6307 — 10 days ago

A Unified PyTorch Framework for Sharpness-Aware Minimization (SAM)

Train flatter, better robustness. 🚀. I want to share my GitHub project: a Unified Sharpness-Aware Minimization (SAM) Optimizer Framework.

While working on Sharpness-Aware Minimization (SAM), I noticed that implementations of various SAM variants are scattered across different repositories, often with inconsistent training pipelines and implementation details. As a result, fair comparisons and reproducibility become challenging, frequently requiring repeated reimplementation of training pipelines just to evaluate minor differences.

Therefore, I decided to build a unified framework for Sharpness-Aware Minimization. This repository offers a concise PyTorch implementation of widely used SAM variants, making it easy to plug in new methods, run fair comparisons, and iterate quickly—without touching the core training loop.

The project is designed with both research and practical experimentation in mind. I plan to actively maintain it and continue adding new SAM variants as the literature evolves.

If you’re interested in optimization, generalization, or robust training, feel free to check it out!! Contributions and feedback are always welcome.🙌

Repo: https://github.com/johnjaejunlee95/torch-unified-sam-optimization

reddit.com
u/Decent_Dimension_802 — 8 days ago
▲ 10 r/optimization+1 crossposts

Coupa sourcing optimization (cso)

Does anyone use CSO and what is the review. My company pays more than 100k each year for this tool and I feel it’s a pretty useless tool… wanted to know if your company is using it how are they using it?

reddit.com
u/unknownshinigami — 11 days ago
▲ 1 r/optimization+1 crossposts

How do you work with large .lp file? Do you even need to open and view .lp files?

Hi,

I once tried to open an 8 GB .lp file. My system hung, and the editor occasionally crashed. Even files around 1 GB feel slow to open.

I was wondering if this is a common problem, so I'd like to understand a few things:

  1. Do you open .lp files to understand or debug your models? If so, what tools do you use?
  2. How often do you encounter large .lp files? By "large," I mean files that take a long time to load, cause your system to hang, or crash your editor. If you remember the file size or model size (number of variables, constraints, and nonzeros), please share.
  3. Does anyone work with mathematical models and solvers without ever needing to open or inspect .lp files?
reddit.com
u/optir — 13 days ago

Optimization Model

Hi everyone! I'm an undergrad student. We have a presentation of our optimization model tomorrow. Can someone here help us check our model and made a critique or suggestions to us please? That would greatly help us. Thank you.

reddit.com
u/Artistic_Solid_9699 — 13 days ago

Routing Optimiztion in Warehouse

I was asked to optimize routing in the “mezzanine” warehouse system of a major 3PL logistics company. Here, pickers who gather products take a mobile cart and go to the relevant locations to retrieve the orders listed on their work orders. We have a Gurobi license. Do you think we should proceed using MILP? There are obstacles such as columns and fire cabinets in some aisles. Generally, the mezzanine structure has five levels, and I need to account for special conditions, such as exit points to the next level. It doesn’t appear to be a classic TSP problem. We requested the x, y, and z coordinates of the locations as data. What other data do you think we should request? Aside from MILP, do you have any other suggestions?

reddit.com
u/Aggressive-Fall-6306 — 13 days ago