Add your description here
Project description
ReMIP Server
This directory contains the ReMIP FastAPI server, which provides a RESTful API for solving Mixed-Integer Programming (MIP) problems.
Running the Server
To run the server, you need to have the dependencies installed (e.g., via uv pip install -e . from this directory). Then, you can start the server using the remip command:
uv run remip --host 0.0.0.0 --port 8000
The server will automatically find an open port if 8000 is in use, unless a specific port is provided.
API Endpoints
GET /solver-info
Returns information about the underlying MIP solver.
- Method:
GET - Success Response:
200 OK - Response Body Example:
{ "solver": "SCIP", "version": "x.y.z" }
POST /solve
Solves a MIP problem. It can return the solution directly or stream solver events using Server-Sent Events (SSE).
- Method:
POST - Query Parameters:
timeout(float, optional): Maximum time in seconds to allow the solver to run.stream(string, optional): If set tosse, the server will stream solver events.
- Request Body: A JSON object representing the
MIPProblem. - Success Response:
200 OK
Request Body (MIPProblem)
The request body must be a JSON object with the following structure:
{
"parameters": {
"name": "MyProblem",
"sense": 1,
"status": 0,
"sol_status": 0
},
"objective": {
"name": "TotalProfit",
"coefficients": [
{ "name": "x1", "value": 10 },
{ "name": "x2", "value": 15 }
]
},
"variables": [
{ "name": "x1", "cat": "Binary" },
{ "name": "x2", "cat": "Binary" }
],
"constraints": [
{
"name": "ResourceA",
"sense": -1,
"coefficients": [
{ "name": "x1", "value": 2 },
{ "name": "x2", "value": 5 }
],
"constant": 10
}
],
"solver_options": {
"limits/time": 60
}
}
Standard Response (MIPSolution)
If the stream parameter is not set, the response will be a JSON object with the solution:
{
"name": "MyProblem",
"status": "optimal",
"objective_value": 25.0,
"variables": {
"x1": 1.0,
"x2": 1.0
}
}
Streaming Response (SSE)
If stream=sse is specified, the response will be a text/event-stream. The client will receive a sequence of events, such as log, metric, result, and end.
Example Event:
event: metric
data: {"timestamp":"...","objective_value":25.0,"gap":0.0,"iteration":10,"sequence":5}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remip-0.3.3.tar.gz.
File metadata
- Download URL: remip-0.3.3.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8be90e677fb2a7b29f511a5043620d4ef8fb984299e9c503f7d6c0bed906622c
|
|
| MD5 |
784ab1c53d219600ca45fe5d1700fda9
|
|
| BLAKE2b-256 |
6ebe7fab1cac41adba2b70a3b76a09f7de5cf9ecea64a7ceaceb9671c2ad9845
|
Provenance
The following attestation bundles were made for remip-0.3.3.tar.gz:
Publisher:
release.yml on ohtaman/remip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remip-0.3.3.tar.gz -
Subject digest:
8be90e677fb2a7b29f511a5043620d4ef8fb984299e9c503f7d6c0bed906622c - Sigstore transparency entry: 567297223
- Sigstore integration time:
-
Permalink:
ohtaman/remip@8a996d0a8df516581b374f7841b384d5a2c6d14a -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ohtaman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a996d0a8df516581b374f7841b384d5a2c6d14a -
Trigger Event:
push
-
Statement type:
File details
Details for the file remip-0.3.3-py3-none-any.whl.
File metadata
- Download URL: remip-0.3.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f595b5650afdbecf19cf6eb90114de196659ae01c22aa2808a3d775f04aad25e
|
|
| MD5 |
9251a3041a3bf3711412c49b28f445d9
|
|
| BLAKE2b-256 |
0341ba65bd0620ef44a6d0e47c9e7aecd2474edfeec03e3cba4c7725663580b7
|
Provenance
The following attestation bundles were made for remip-0.3.3-py3-none-any.whl:
Publisher:
release.yml on ohtaman/remip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remip-0.3.3-py3-none-any.whl -
Subject digest:
f595b5650afdbecf19cf6eb90114de196659ae01c22aa2808a3d775f04aad25e - Sigstore transparency entry: 567297225
- Sigstore integration time:
-
Permalink:
ohtaman/remip@8a996d0a8df516581b374f7841b384d5a2c6d14a -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ohtaman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a996d0a8df516581b374f7841b384d5a2c6d14a -
Trigger Event:
push
-
Statement type: