mathematical optimization - Linear programming constraint "x >= c or x = 0" -
i express linear program having variable can greater or equal constant c or equal 0. range ]0; c[ being unallowed.
do know way express constraint in linear program, in way can solved using unmodified simplex implementation ?
for example constraint : x1 >= 4 or x1 = 0.
typical relation between constraints in linear program and. here or between 2 constraints.
note: need solve problems having multiple variables in computationally efficient way.
a mathematical program constraints you've defined cannot represented linear program , therefore cannot solved using unmodified simplex implementation. reasoning simple enough -- feasible set linear program must convex. set {x = 0 or x >= 2} not convex because contains points x=0 , x=2 not x=1.
as result, you'll forced use other mathematical programming techniques; 1 comes mind mixed integer linear programming (milp). each variable x_i constraint of form x_i = 0 or x_i >= c_i define auxiliary variable y_i, along following constraints:
x_i >= c_iy_i x_i <= my_i y_i binary if y_i=0, constraints x_i >= 0; x_i <= 0, meaning x_i=0. if y_i=1, constraints x_i >= c_i, x_i <= m. should set m sufficiently large value problem, careful not set m large, make problem harder solve.
whether or not computationally tractable depends on size , structure of mathematical program quality of solver you're using. have many options milp solver; instance in r use lpsolve, lpsolveapi, or rglpk libraries, or in matlab use intlinprog function. in general cplex , gurobi considered best milp solvers, both commercial , require license.
Comments
Post a Comment