Registry / other / ampl-mp

ampl-mp

JSON →
library4.1.0vcpkgunverified

An open-source library for mathematical programming, providing solvers and modeling interfaces.

vcpkg install ampl-mp
INSTALL
IMPORT
SIG · AMPL-MP
A
ampl-mp
othercppv4.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mp.h
#include <mp.h>

Initialize AMPL MP, load a model, solve, and retrieve variable values

#include "mp.h" #include <iostream> int main() { // Initialize AMPL MP environment mp_Env* env = mp_EnvCreate(); if (!env) { std::cerr << "Failed to create AMPL MP environment" << std::endl; return 1; } // Load a model (example: simple LP) const char* model = "var x; minimize obj: x; subject to c: x >= 0;"; mp_EnvReadString(env, model); // Solve mp_EnvSolve(env); // Get solution double val; mp_VarGetValue(env, "x", &val); std::cout << "x = " << val << std::endl; mp_EnvDestroy(env); return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
4.1.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
24
Meta
2
Amazon
1
OpenAI (training)
1
Resources

No resource links recorded.

ampl-mp — pip install ampl-mp · libregistry