Skip to main content

Causara is a Python package designed for advanced surrogate modeling of optimization problems. For more information, visit https://www.causara.com.

Project description

Causara: AI-powered Optimization

Support: support@causara.com

Website: https://www.causara.com

Causara is a Python package for optimizing ANY function using mathematical solvers. We specialize in highly complex problems that involve simulations or other non-standard objectives. Additionally, for existing Pyomo models, we can leverage our technology to significantly accelerate the optimization process and to fine-tune the models on real-world data. We use artificial intelligence and machine learning to create high-precision surrogate models. These models are significantly easier and faster to optimize than the original, complex systems, without sacrificing accuracy. The result: faster, better, and more robust solutions.

Installation

Install Causara via pip:

pip install causara

Creating a free licence key

import causara
causara.create_key("your_email@example.com")

Quickstart

Simple proof of concept demo:

from causara import *
import numpy as np


def simple_demo(p, c, x):
    coef = p["coef"]
    var = x["var"]
    assert var[0] < var[1] and np.sum(var) == 10
    return coef * var[0] + var[0] * var[1]


def get_decision_vars(p, c):
    decision_vars = DecisionVars()
    # Here we create two integer variables with name "var" and bounds [-10,+10]
    decision_vars.add_integer_vars("var", 2, minimum=-10, maximum=+10)
    return decision_vars


model = Model(key="your_key", model_name="demo", solver="scip")          # insert your key here and provide a model name
model.compile(decision_vars_func=get_decision_vars,                      # the decision_vars_func
              obj_func=simple_demo,                                      # the objective function
              P_val=[{"coef": 1.0}],                                     # a list of problems p for validating the correctness
              sense=MINIMIZE)                                            # the sense (either causara.MINIMIZE or causara.MAXIMIZE)

# After compiling we can solve a new problem instance p={"coef": 1.5}
data = model.optimize(p={"coef": 1.5})                                   # Return value of the optimize(.) method is an object of type Data
print(f"Optimal x: {data.list_of_x[0]}")
print(f"Optimal value: {data.pyomo_values[0]}")

LICENSE

This project is licensed under the terms provided in LICENSE.txt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

causara-3.4.6.tar.gz (51.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

causara-3.4.6-py3-none-any.whl (51.8 MB view details)

Uploaded Python 3

File details

Details for the file causara-3.4.6.tar.gz.

File metadata

  • Download URL: causara-3.4.6.tar.gz
  • Upload date:
  • Size: 51.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for causara-3.4.6.tar.gz
Algorithm Hash digest
SHA256 dc6ce97f382a044a7e21b21928fe583035525737b3aa0be3b96b27816a7c0cd7
MD5 c9fa43611d9cf2983dd30cc399056a98
BLAKE2b-256 14bf090399f5c7bf8c10b364a935be89a1d01790b986f7905e5e8885664b660b

See more details on using hashes here.

File details

Details for the file causara-3.4.6-py3-none-any.whl.

File metadata

  • Download URL: causara-3.4.6-py3-none-any.whl
  • Upload date:
  • Size: 51.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for causara-3.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 837ea12fabe501f8709d130d0c3ed2f35bbc297e147c8b9061d481030453ab68
MD5 090989ca8d7c7152cc79cd4cad753513
BLAKE2b-256 657c7f1432d05c108604b0baada43d0aeb2df4a9a779e3f9953b1c7bdc656b83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page