# mathematical optimization – ArgMax : Variable Domain Error

I’m attempting to utilize the ArgMax function, but am receiving the error “ArgMax::vdom: Variable domain … should be either Reals or Integers.”

`ArgMax[{objective, cons == 1}, assign, {assign} ∈ {0, 1}] `

As a quick overview, we have edges denoted $$e_{i,j}$$ in $$mathbb{R}^3$$, and we want to assign an integer value of 0 or 1 to each such that their sum is at most 1 for each set of edges. So, objective is defined as a set of sets as summations with constant coefficients r_ij,
$$objective = {{r_{1,1}e_{1,1} + r_{1,2}e_{1,2} + … + r_{1,n}e_{1,n}}, {r_{2,1}e_{2,1} + r_{2,2}e_{2,2} + … + r_{2,m}e_{2,m}}, …}$$.

We also have a set of sets for constraints defined as $$cons = {{{e_{1,1} + e_{1,2} + … + e_{1,n}}, {e_{2,1} + e_{2,2} + … + e_{2,m}}, …}}$$.

Lastly, we have the variables defined in $$assign = {e_{1,1}, e_{1,2}, …, e_{2,1}, e_{2,2}, …}$$.

I’m new to Mathematica, so this may be a trivial fix, but if anyone can point out my error, I would greatly appreciate it.

Posted on Categories Articles