coin-or / coin-or/python-mip

Use MIP in Web Assembly Pyodide

Open
#249 3 comments 0 reactions 0 assignees View on GitHub
cbc-platform
Dominant language
Linear Programming
Stars
600
Forks
108
PR merge metrics
No merged PRs in 30d

Description

Hi MIP team,
I'm trying run MIP in browser using pyodide. I'm installing mip whit .whl that I found in pip website and function perfect. The problem is whit cbc. Exist a way to make possible compile cbc in web assembly, or use as a python library? Or do you have suggestions for this problem?





async function main() {
let pyodide = await loadPyodide({
indexURL: "https://cdn.jsdelivr.net/pyodide/v0.19.0/full/"
});
await pyodide.loadPackage("micropip");

// Intall MIP
// correct instalation of mip
// but not is possible use CBC
pyodide.runPythonAsync(`
import micropip
await micropip.install('https://files.pythonhosted.org/packages/e5/7c/615a417b8b74dde4c3573f09c79612e3e0ed8c9b9488daf67e86cde350d2/mip-1.13.0-py3-none-any.whl')
import mip
print(mip)
model = mip.Model()
`);
}
main();

![image](https://user-images.githubusercontent.com/53499619/154801450-7e5e53a0-974c-4164-9818-e5d8f7f75c3b.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.