Budget split with fixed channel costs
Input
{
"constraints": [
{
"op": "<=",
"rhs": 60000,
"terms": [
{
"coeff": 1,
"var": "spend_a"
},
{
"coeff": 1,
"var": "spend_b"
},
{
"coeff": 1,
"var": "spend_c"
},
{
"coeff": 5000,
"var": "open_a"
},
{
"coeff": 20000,
"var": "open_b"
},
{
"coeff": 2000,
"var": "open_c"
}
]
},
{
"op": "<=",
"rhs": 0,
"terms": [
{
"coeff": 1,
"var": "spend_a"
},
{
"coeff": -40000,
"var": "open_a"
}
]
},
{
"op": "<=",
"rhs": 0,
"terms": [
{
"coeff": 1,
"var": "spend_b"
},
{
"coeff": -30000,
"var": "open_b"
}
]
},
{
"op": "<=",
"rhs": 0,
"terms": [
{
"coeff": 1,
"var": "spend_c"
},
{
"coeff": -40000,
"var": "open_c"
}
]
}
],
"objective": {
"sense": "maximize",
"terms": [
{
"coeff": 1.2,
"var": "spend_a"
},
{
"coeff": 1.5,
"var": "spend_b"
},
{
"coeff": 1.1,
"var": "spend_c"
}
]
},
"variables": [
{
"max": 40000,
"min": 0,
"name": "spend_a",
"type": "continuous"
},
{
"max": 30000,
"min": 0,
"name": "spend_b",
"type": "continuous"
},
{
"max": 40000,
"min": 0,
"name": "spend_c",
"type": "continuous"
},
{
"max": 1,
"min": 0,
"name": "open_a",
"type": "integer"
},
{
"max": 1,
"min": 0,
"name": "open_b",
"type": "integer"
},
{
"max": 1,
"min": 0,
"name": "open_c",
"type": "integer"
}
]
}Output
Build-time verified. stats.elapsed_ms normalized to 0.
{
"best_bound": 62300.0,
"bound_verified": false,
"max_violation": 0.0,
"objective_value": 62300.0,
"solution": {
"open_a": 1,
"open_b": 0,
"open_c": 1,
"spend_a": 40000.0,
"spend_b": 0.0,
"spend_c": 13000.0
},
"stats": {
"elapsed_ms": 0,
"timed_out": false
},
"verdict": "optimal",
"verified": true
}Request
curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/solve/lp-mip -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"spend_a","type":"continuous","min":0,"max":40000},{"name":"spend_b","type":"continuous","min":0,"max":30000},{"name":"spend_c","type":"continuous","min":0,"max":40000},{"name":"open_a","type":"integer","min":0,"max":1},{"name":"open_b","type":"integer","min":0,"max":1},{"name":"open_c","type":"integer","min":0,"max":1}],"constraints":[{"terms":[{"var":"spend_a","coeff":1},{"var":"spend_b","coeff":1},{"var":"spend_c","coeff":1},{"var":"open_a","coeff":5000},{"var":"open_b","coeff":20000},{"var":"open_c","coeff":2000}],"op":"<=","rhs":60000},{"terms":[{"var":"spend_a","coeff":1},{"var":"open_a","coeff":-40000}],"op":"<=","rhs":0},{"terms":[{"var":"spend_b","coeff":1},{"var":"open_b","coeff":-30000}],"op":"<=","rhs":0},{"terms":[{"var":"spend_c","coeff":1},{"var":"open_c","coeff":-40000}],"op":"<=","rhs":0}],"objective":{"sense":"maximize","terms":[{"var":"spend_a","coeff":1.2},{"var":"spend_b","coeff":1.5},{"var":"spend_c","coeff":1.1}]}}'