$title Solve Bensolvehedron model (moo03,SEQ=153) $onText This example demonstrates how to solve an instance of Bensolvehedron. Bensolvehedron is a class of multi-objective optimization problems introduced on besolve.org. An instance of Bensolvehedron is generated based on the number of objectives p and the complexity of the polyhedron m. Both can be set through double dash parameters: --p= --m= Keywords: multi-objective optimization, bensolvehedron $offText * number of objectives $if not set p $set p 2 * complexity of the polyhedron $if not set m $set m 3 $eval p2m %p%+2*%m% $eval n (%p2m%)**%p% $eval n2 2*%n% Set p 'objectives' / p1*p%p% / m 'complexity' / m1*m%m% / n2 'variables 2x' / n1*n%n2% / n(n2) 'variables' / n1*n%n% / cel 'elements in C' / c1*c%p2m% / comb(n,p,cel) 'all combinations of elements in C' / system.powerSetRight / points 'pareto points' / point1*point1000 /; Parameter C(p,n) 'objective matrix' C_val(cel) 'value of elements in C' A(n2,n) 'constraint matrix' b(n2) 'constraint vector' dir(p) 'direction of the objective functions 1 for max and -1 for min' / #p -1 / pareto_obj(points,p) 'objective values of the pareto points'; A(n,n) = 1; A(n2,n)$(ord(n2)=ord(n)+card(n)) = -1; b(n) = 1; C_val(cel) = ord(cel)-((%p2m%-1)/2)-1; loop(comb(n,p,cel), C(p,n) = C_val(cel); ); Variable Z(p) 'objective variables'; Positive Variable X(n) 'decision variables'; Equations objectives(p) constraints(n2); objectives(p).. Z(p) =e= sum(n, C(p,n)*X(n)); constraints(n2).. sum(n,A(n2,n)*X(n)) =l= b(n2); Model bensolvehedron / all /; $onEcho > cplex.opt threads 1 $offEcho $libinclude moo Sandwiching bensolvehedron LP p dir Z points pareto_obj -solver=cplex -optfile_init=1 -optfile_main=1 display pareto_obj;