Yeah, as you said , i introduce a binvar beta to reprent the ceil(x), but we need too make sure it satify following constrains:
if alpha > 0 , then beta = 1;
if beta = 1, then alpha > 0;
if beta = 0, then alpha = 0;
if alpha = 0, then beta = 0;
and the four conditions can be written as :
alpha <= beta;
beta < alpha + 1;
Then , the max can be rewritten as:
beta <= sum(alpha) <= 1;
Last , i use the Mccormick Envelope to linerize the alpha*beta and use intlinprog to solve this , it was too slowly.
Does there any better choice?
Besides, i just googled 'binmode', it's really useful.
Thanks a lot for your help.