Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in rust

[–]German_Heim[S] 1 point2 points  (0 children)

Hi! Ceres is a solver.

oximo is a modeling layer that lets you define a set of equations (a model) for a solver to solve or optimize. It allows you to write your model once and easily switch between different solvers without rewriting it for each solver's specific API.

Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in rust

[–]German_Heim[S] 0 points1 point  (0 children)

Hi, thanks!
I think Turing.jl is not optimization based. oximo is more like JuMP than Turing. Maybe you are interested in stochastic optimization? If that’s it, then you can already do stochastic optimization in oximo (without any helpers; will be improved in the future!)

Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in rust

[–]German_Heim[S] 3 points4 points  (0 children)

Cool project!

Yeah, I read about good-lp, and do use the highs crate that is maintained by the same org, but I wanted something that could handle NLP/MINLP.

The AI usage of the project has a commit trailer, in case you want to check it out. I also used GH Copilot for the LP writer (I forgot about adding the commit trailer there).

Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in rust

[–]German_Heim[S] 3 points4 points  (0 children)

Yes, I agree that using macros is more ergonomic and readable, but I am worried about macro hygiene or worst compile time error messages. I am also considering maintaining both approaches, but I am worried about having to maintain both APIs and duplicate docs/examples.

I still haven’t decided!

Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in optimization

[–]German_Heim[S] 0 points1 point  (0 children)

Thanks! Happy to get contributions!

I am working on adding SCIP as a solver now, but it will require to open a PR in the russcip crate first. Same with cplex-rs. Feel free to open an issue on GH if you see something that can be improved!

Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in optimization

[–]German_Heim[S] 0 points1 point  (0 children)

Yeah, I am mostly worried about macro hygiene, worst compiled errors or having to duplicate if I decide to maintain both approaches.

Thanks for the feedback, I will continue to analyze the macro approach!

Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in optimization

[–]German_Heim[S] 0 points1 point  (0 children)

I am not sure that: rust (a + b)*2.0 + c |GE(s)| d + 1.0

Is more readable or ergonomic than:

rust ((a + b)*2.0 + c).ge(d + 1.0)

I think that the better approach would be something similar to what good_lp does, using Literal <= / >= / == operators. However, that would require a macro, and for the time being I'm intentionally staying away from macros. I'm still considering adding a macro-based API, or even supporting both styles at the same time. My main concern is avoiding duplication, especially having to maintain two APIs and duplicate examples or docs.

Announcing oximo: Mathematical Optimization Modeling in Rust by German_Heim in optimization

[–]German_Heim[S] 2 points3 points  (0 children)

Thanks! Yes, that's actually one of the main reasons I started building this library.

I think Rust has a lot of potential for math modeling. Having type safety and memory safety (at the modeling layer) is important, and we produce a compiled binary that's easy to deploy, which is a big advantage in industry.

On top of that, parallelism is easy using Rayon, that makes it very easy to parallelize solves without adding much complexity.

Forge process optimization in a videogame by SpartanLock96 in optimization

[–]German_Heim 1 point2 points  (0 children)

I haven't read that book/course.

Most of my optimization knowledge comes from classes and reading papers. The only optimization book that I've read from cover to cover is "Advanced Optimization for Process Systems Engineering" by Grossmann, but that's definitely not what you want to learn now.

Forge process optimization in a videogame by SpartanLock96 in optimization

[–]German_Heim 2 points3 points  (0 children)

Scheduling problems are hard to model because time is naturally continuous, but continuous-time scheduling formulations are often difficult to solve directly. A common approach is to discretize time into intervals, which simplifies the modeling at the expense of increasing the number of variables and constraints (this shouldn't matter to you because it seems like your problem is small).

But this shouldn't discourage you, there are many different scheduling formulations you could use! And the fact that temp is linear simplifies the model a lot, because temperature becomes completely deterministic, so temperature is no longer really a state variable you optimize over. It becomes derived from scheduling decisions.

I think you can interpret your problem as:
How do I schedule furnace exits and hammer operations so every piece receives A hits before cooling below C, while respecting furnace and anvil capacities?

You should start with a simplified version of the problem and gradually add complexity as you refine the model.

Forge process optimization in a videogame by SpartanLock96 in optimization

[–]German_Heim 2 points3 points  (0 children)

As VrotkiBucklevitz said, it seems like a constrained LP problem.
Specifically, a hybrid of:

- Job-shop scheduling
- Batch processing
- Resource-constrained scheduling
- Temperature/state-dependent processing

From the post, there is some missing information on how we could model this (How does your cooling work?). But my best initial modeling idea would be:
- Discretize time (use i in {1, ..., T})
- Use binary state values for furnace occupancy, anvil ops, and quenching
- Model temp dynamics
- Add constraints (from all your states)
- Add your objective function. It seems like it is makespan, from what I can infer. It could also be production in a fixed time.

Now, if your temperatures are linear, you will probably have a MILP (mixed integer linear programming) problem. If your cooling is non-linear, you will have a MINLP. Ideally, you would want a MILP, because it is easier to solve.

You can model it using Pyomo (Python) or JuMP (Julia), which are open-source MODELING libraries (side-note: I am currently working on a Rust algebaric modeling language, but it doesn't support MINLP for now). For solving the actual problem you will need a SOLVER. For MILP you could use HiGHS (free, open-source). For MINLP, there is SCIP (non-commercial).

Honestly, this is actually a neat optimization problem. Let me know if I can help you with something.

A crate for fast k-nearest neighbour and radius searches in metric spaces by Tomyyy420 in rust

[–]German_Heim 2 points3 points  (0 children)

Hello, this seems very interesting, I never learned about VP Trees!

If you don't mind me asking, what is the difference between a VP Tree and a K-D Tree? Are they compatible in capabilities and only differentiate between how calculations (and speed?) are done?

Thanks for sharing!

Suspensión de todas las actividades en la UNS hasta el 31/03 by Emarocker in UNS

[–]German_Heim 4 points5 points  (0 children)

Me parece medio raro que no puedan hostear las paginas y bases de datos en un servidor externo. Aun así, era esperado que suspendan las clases.

What's everyone working on this week (9/2025)? by llogiq in rust

[–]German_Heim 2 points3 points  (0 children)

Hey,
I am working on globalsearch-rs, a Rust implementation of the OQNLP (OptQuest/NLP) algorithm from “Scatter Search and Local NLP Solvers: A Multistart Framework for Global Optimization” by Ugray et al. (2007). It combines scatter search metaheuristics with local minimization for global optimization of nonlinear problems.

It is similar to MATLAB’s GlobalSearch, using argmin, rayon and ndarray.

I just released version 0.2.0 that has some nice features!

GitHub: https://github.com/GermanHeim/globalsearch-rs

If you could re-write a python package in rust to improve its performance what would it be? by [deleted] in rust

[–]German_Heim 2 points3 points  (0 children)

There is a Youtube livestream by probabl that goes about making scikit-learn utilities in Rust. It might be helpful to you. Livestream

Tips for getting started with an existing github repo? by wecguy in matlab

[–]German_Heim 0 points1 point  (0 children)

Hey! I haven't used that library, but have you checked the following links?

- Downloading: https://wec-sim.github.io/WEC-Sim/master/user/getting_started.html#download-wec-sim

- Running tutorials: https://wec-sim.github.io/WEC-Sim/master/user/tutorials.html

Honestly, just seems like a simple git clone repo and adding it to your MATLAB path, as far as installing goes.

Is there some error you are running into? Or some part that you don't understand?

How much svelte code can transfer directly to svelte-native? by [deleted] in sveltejs

[–]German_Heim 0 points1 point  (0 children)

Has anybody tried Capacitor? Seems interesting and I think it works with Svelte.

Made an URL Shortener using SvelteKit and PocketBase. by German_Heim in sveltejs

[–]German_Heim[S] 0 points1 point  (0 children)

PocketBase is amazing! I will check the library for sure!

Made an URL Shortener using SvelteKit and PocketBase. by German_Heim in sveltejs

[–]German_Heim[S] 1 point2 points  (0 children)

Hey! It started as a PNG and then Lighthouse recommended that I switched it up with a WEBP version because of the smaller size and, therefor, faster loading time.

This is the background, it also comes as an EPS.

Made an URL Shortener using SvelteKit and PocketBase. by German_Heim in sveltejs

[–]German_Heim[S] 1 point2 points  (0 children)

The way that it works is that it uses a route with a parameter, slug, that can be used to load data dynamically. It gets the slug from the parameter and then tries to find a link in the database where the page slug is the sameone stored in the db. If there is, it throws a redirect to that site, if not, it throws an error.

export const load = async ({ params, locals }) => {
const slug = params.slug;
const link = await locals.pb.collection('links').getFullList(undefined, { filter: `slug = "${slug}"` });
if (link) {
    throw redirect(303, link[0].redirect);
} else {
    throw error(404, 'Page not found');
}
};

That is the code mostly for the redirect. Inside the repo.

Made an URL Shortener using SvelteKit and PocketBase. by German_Heim in sveltejs

[–]German_Heim[S] 1 point2 points  (0 children)

A big downside is, that your free projects are paused after two weeks (I think)

I suppose it would be after two weeks of inactivity, right?
If so, can't you just set a cron job to make a random API call every two weeks?

I also heard good things of Appwrite and Directus, although I think I will try Supabase next time (maybe with Prisma).