OptFrame is an optimization framework focused in metaheuristic techniques

Overview

optframe-rust

Welcome to OptFrame project in Rust.

What is OptFrame?

OptFrame is an optimization framework focused in metaheuristic techniques, developed over 15 years by Brazilian research groups.

The OptFrame project has been hosted in SourceForge for many years, then moved to GitHub few years ago. It is open-source and dual licensed under LGPLv3 and MIT License (after version 4.3). The project OptFrame is originally written in C++.

Why provide a Rust package for OptFrame?

OptFrame was born around 2008, before C++11 standard arrived. Coding in C++ at that time was amazing, but quite challenging.

When C++11 arrived with move semantics and managed pointers (unique_ptr and shared_ptr), OptFrame started using those features, what helped a lot to safely manage memory, without big impacts on performance.

When C++14 and C++17 arrived, many other nice stuff was adopted, including optionals and tuples.

When C++20 arrived, concepts was heavily introduced in OptFrame, what helped managing templates and also experimentation with coroutines.

So, why try Rust now?

I've been a fan of novel languages for a while, and Rust is certainly attracting interesting developers. It is becoming more and more challenging to find new developers in C++, so I've been creating this feeling of trying Rust for a while...

During 2021 and 2022, some nice students have demonstrated interest in trying OptFrame, but only if it was written in Rust... Yesterday (19/01/2022), a profound chat with a nice student finally convinced me that it's time to try Rust. I thought that, if Rust is truly a nice language, it wouldn't take more than 24 hours for experienced C++ developers to port a tiny (but central) part of OptFrame and experiment it here (full project will certainly take months). So here we are! At 20/01/2022, we are proud to announce a first sketch of OptFrame in Rust :)

First Impressions of Rust

The ideas of modern C++ and Rust regarding memory management are not so different, so when you think of Box as unique_ptr, few things needed to be changed. Hopefully, C++ concepts and classes, compared to Rust traits are also quite similar, for our use case.

C++ still misses nice modularization. The advantage of Rust is quite clear regarding shorter and cleaner error messages, so as providing a standard package manager and standard build system (cargo).

Try OptFrame in Rust

I guess it's just cargo run.

See main.rs for a draft example, which follows the same logic as OptFrame TSP Example in Quickstart.

Versioning

This project will start from alpha versions (0.x) and then follow OptFrame C++ major version, starting from 5.x. After that, typical semantic versioning may apply (for features and bugs). However, Major version is expected to be in sync with OptFrame Project C++.

Progress and Timeline

  • 20/01/2022: first draft is released

Missing features

  • Next step is to port NS, NSFind, NSSeq and NSEnum
  • Check for coroutine alternatives in Rust
  • Check for borrowing strategies when nesting inside methods (for XESolution)
  • Check for Disjunctions in concepts for Evaluation and MultiEvaluation to coexist
  • Port metaheuristics...
  • Port Check Module
  • much more!

Acknowledgements

I appreciate all advices from friends and students, specially Eduardo (from dbofmmbt/optimum) and Victor, for motivating me to create this OptFrame port as quickly as possible.

License

Dual LGPLv3 and MIT License

Copyleft 2022

Igor Machado Coelho

You might also like...
NAT Traversal techniques for p2p communication

P2P NAT-Traversal Crate Documentation Linux/OSX/Windows The goal of this crate is to provide a robust and crypto-secure NAT traversal for peer to peer

RustRedOps is a repository dedicated to gathering and sharing advanced techniques and malware for Red Team, with a specific focus on the Rust programming language. (In Construction)

RustRedOps In Construction.... The project is still under development Overview RustRedOps is a repository that houses various tools and projects relat

YAML(ish) - Terminal UI framework based on templates focused on simplicity
YAML(ish) - Terminal UI framework based on templates focused on simplicity

A YAML(ish) based terminal GUI framework for- and by Rust, focussed on making it quick and easy to create a functional UI for an app or game. Based on Crossterm and inspired by Kivy.

Hirola is an opinionated web framework for that is focused on simplicity and predictability.

Hirola Hirola is an opinionated web framework for that is focused on simplicity and predictability. Goals Keep it simple. Most Rust web frameworks hav

Rust implementation of real-coded GA for solving optimization problems and training of neural networks
Rust implementation of real-coded GA for solving optimization problems and training of neural networks

revonet Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also know

Mathematical optimization in pure Rust

argmin A pure Rust optimization framework This crate offers a numerical optimization toolbox/framework written entirely in Rust. It is at the moment p

Collection of Optimization algorithm in Rust

rustimization A rust optimization library which includes L-BFGS-B and Conjugate Gradient algorithm. Documentation The simplest way to use these optimi

Linearly Constrained Separable Optimization

LCSO (Linearly Constrained Separable Optimization) Authors The original algorithms here were developed by Nicholas Moehle, and this project was author

Rust implementation of real-coded GA for solving optimization problems and training of neural networks
Rust implementation of real-coded GA for solving optimization problems and training of neural networks

revonet Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also know

TP - Optimization of the energy consumption of a Matrix Multiplication

Optimization de la consommation: Multiplication de matrices Nous allons travailler sur la multiplication de matrices denses. C’est un algorithme class

A pure, low-level tensor program representation enabling tensor program optimization via program rewriting

Glenside is a pure, low-level tensor program representation which enables tensor program optimization via program rewriting, using rewriting frameworks such as the egg equality saturation library.

A standalone Aleo prover build upon snarkOS and snarkVM, with multi-threading optimization

Aleo Light Prover Introduction A standalone Aleo prover build upon snarkOS and snarkVM, with multi-threading optimization. It's called "light" because

A neural network model that can approximate any non-linear function by using the random search algorithm for the optimization of the loss function.

random_search A neural network model that can approximate any non-linear function by using the random search algorithm for the optimization of the los

A library and application for lossless, format-preserving, two-pass optimization and repair of Vorbis data, reducing its size without altering any audio information.
A library and application for lossless, format-preserving, two-pass optimization and repair of Vorbis data, reducing its size without altering any audio information.

OptiVorbis A library and application for lossless, format-preserving, two-pass optimization and repair of Vorbis data, reducing its size without alter

Image optimization using Rust and Vips 🦀

Huffman Image optimization using Rust and Libvips. Requirements You must have the following packages installed before getting started Rust Vips pkg-co

A blazingly fast compiling & optimization tool for CosmWasm smart contracts.
A blazingly fast compiling & optimization tool for CosmWasm smart contracts.

cw-optimizoor A blazingly fast alternative to CosmWasm/rust-optimizer for compiling & optimizing CW smart contracts. It's primarily meant to speed up

Salty and Sweet one-line Rust Runtime Optimization Library

SAS SAS (Salty-And-Sweet) is an one-line Rust runtime optimization library. Features NUMA-aware rayon: numa feature should be enabled If you have 1 NU

Simple git/hg tui client focused on keyboard shortcuts
Simple git/hg tui client focused on keyboard shortcuts

verco A simple Git/Hg tui client focused on keyboard shortcuts Screenshots Platforms This project uses Cargo and pure Rust stable and works on latest

Zero-details, privacy-focused in-app file system.

ZboxFS ZboxFS is a zero-details, privacy-focused in-app file system. Its goal is to help application store files securely, privately and reliably. By

Comments
  • Apply some Rust standards

    Apply some Rust standards

    • style: run cargo fmt
      • people always use rustfmt to determine how the code will look like.
    • refactor: convert project from bin to lib
    • fix: use unambiguous name for optframe module
    • refactor: apply clippy suggestions
      • clippy is a linter from the rust project which helps following good style.
    • docs: include README on crate documentation
    • refactor: remove #[allow(non_snake_case)]
      • Rust libs always follow the casing determined by the language. You'll get used to it.
    opened by dbofmmbt 1
The 峨眉 (EMei) JIT/AOT backend framework.

emei The 峨眉 (EMei) JIT/AOT backend framework. Support Instructions x86_64 mov mov mov_zero_extend_bit8/16 mov_sign_extend_bit8/16/32 mov_rev movs(is m

Lyzh 14 Apr 11, 2022
Nimbus is a framework for building parachain consensus systems on cumulus-based parachains.

Cumulo -- Nimbus ⛈️ Nimbus is a framework for building parachain consensus systems on cumulus-based parachains. Given the regular six-second pulse-lik

null 36 Dec 14, 2022
A Rust framework for building context-sensitive type conversion.

Xylem is a stateful type conversion framework for Rust.

Jonathan Chan Kwan Yin 4 May 11, 2022
Elegant, clean Rust development framework

Preview version, will not guarantee the stability of the API! Elegant, clean Rust development framework Core Features Relational database client for M

Ideal World 35 Dec 29, 2022
BlackBird is a framework for Rust Tokio

BlackBird Blackbird is framework like OTP for Erlang. Blackbird is not a Actor Framewrok, it's Behavior for around Tokio task This project currently p

DanyalMh 25 Dec 15, 2022
Moonshine CSS - 🥃 High-proof atomic CSS framework

Moonshine CSS - ?? High-proof atomic CSS framework

Econify 25 Nov 25, 2022
RustHunter is a modular incident response framework to build and compare environmental baselines

RustHunter is a modular incident response framework to build and compare environmental baselines. It is written in Rust and uses Ansible to collect data across multiple hosts.

Giovanni Pecoraro 13 Dec 12, 2022
Blazingly fast spam classification API built using Rocket Web Framework.

Telegram Antispam API Blazingly fast spam classification API built using Rocket Web Framework. Notes The classifier works in aggressive mode, it can s

Akshay Rajput 13 May 5, 2023
simple lottery maker made with rust, just web framework

Toy project for fun It's just for fun! making plausible lottery numbers for Korea made with rust This lottery web framework generates and presents pla

yacho (bakjuna) 4 Nov 24, 2023
⚡rustygram is a minimal and blazing fast telegram notification framework for Rust

⚡rustygram ⚡rustygram is a minimal and blazing fast telegram notification framework using Rust. Abstracts away the Telegram API complexity so your app

Chia Yong Kang 15 Dec 1, 2023