Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  A simple min 0-1 linear programming with a "Error:not enough memory"

    Posted 09/14/12 01:32 AM

    Originally posted by: SystemAdmin


    using CP;
    //TAZ影响区个数;
    int infCount=...;
    //最大TAZ个数(TAZ中心点个数);
    int maxTAZNum=...;
    //最小TAZ个数(TAZ中心点个数);
    int minTAZNum=...;
    //TAZ索引范围(TAZ中心点取值范围,TAZ个数取值范围);
    range ithCenInf=1..infCount;
    //TAZ影响区索引(TAZ影响区个数取值范围);
    range jthInf=1..infCount;

    //各个影响区的需求
    int DemandjthInf=...;
    //影响区j到TAZi中心影响区的距离;
    float DistanceithCenInfjthInf=...;
    //单个Cell的面积
    float CellArea=...;
    //以第i个Inf为中心的TAZ最小的面积=0.7乘以第i个Inf的面积;
    float MinTazAreaithCenInf=...;
    float Sum2LD=...;
    float LocalDepthjthInf=...;
    int ComPoolithCenInfjthInf=...;
    dvar int CompositionsithCenInfjthInf in 0..1;
    dvar int CenInfsithCenInf in 0..1;
    dvar int K in minTAZNum..maxTAZNum;
    minimize
    sum(i in ithCenInf, j in jthInf) Compositions[i][j]*Distance[i][j]*Demand[j];

    subject to {
    forall(i in ithCenInf, j in jthInf)
    ct0:
    CenInfs[i]>=Compositions[i][j];
    ct1:
    sum(i in ithCenInf) CenInfs[i]==K;
    ct2:
    sum(i in ithCenInf, j in jthInf) Compositions[i][j]==infCount;
    forall(j in jthInf)
    ct3:
    sum (i in ithCenInf) Compositions[i][j]<=1;
    forall(i in ithCenInf)
    ct4:
    sum(j in jthInf) CellArea*Compositions[i][j]>=MinTazArea[i]*CenInfs[i];
    forall(i in ithCenInf)
    ct5:
    sum(j in jthInf) LocalDepth[j]*Compositions[i][j]>=0.7*(Sum2LD/K);
    forall(i in ithCenInf, j in jthInf)
    ct6:
    Compositions[i][j]<=ComPool[i][j];
    }
    ******************************************
    it meant to solve the following problem:
    ******************************************
    jthInf
    0 1 2 .... 902
    +--+--+--+--+--+--+
    0 | | | | | | | -----> Compositions[0][0]...Compositions[0]902
    i +--+--+--+--+--+--+
    t 1 | | | | | | | -----> Compositions[1][0]...Compositions[1]902
    h +--+--+--+--+--+--+
    I . | | | | | | | .
    n . +--+--+--+--+--+--+ .
    f . | | | | | | | .
    +--+--+--+--+--+--+
    902 | | | | | | | -----> Compositions902[0]...Compositions902902
    +--+--+--+--+--+--+

    The model delineates zoning system, according to its goals, for a defined range of number of zones(i.e.,minTAZNum..maxTAZNum), and calculates the optimal number and compositions of zones for that range.
    ******************************************
    .data is like the following :
    ******************************************
    infCount=903;
    maxTAZNum=903;
    minTAZNum=1;
    Demand=(1*903 array);
    Distance=(903*903 double matrix );
    CellArea=0.656;
    MinTazArea=(1*903 array);
    Sum2LD=625423.0;
    LocalDepth=(1*903 array);
    ******************************************
    Error :
    ******************************************
    Always, at about one and half minites, there goes the error: not enough memory.

    I think maybe:
    1.the .data size is too large?(and is there a limit about a model input data in ilog cplex?)
    2.can we exploit much more memory for cplex by some kind of configuration or change a better computer??
    3.the model should be decompose by methods like column generation?
    but if it is the situation "3", how can i realize the decomposition?
    Or is there any other reasons that cause this problem?
    please help~!!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: A simple min 0-1 linear programming with a "Error:not enough memory"

    Posted 09/14/12 05:24 PM

    Originally posted by: SystemAdmin


    1. This is the COLES forum. You are using CP Optimizer. There is a separate forum for that, where you likely would get a better answer.

    2. Your model is hard to read. If you repost, try surrounding the model with {code} on each side.

    3. It is possible that the default search strategy is not efficient on your problem. You may need to come up with a customized strategy.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: A simple min 0-1 linear programming with a "Error:not enough memory"

    Posted 09/14/12 05:28 PM

    Originally posted by: SystemAdmin


    Sorry, COLES should have been CPLEX. (Stupid autocorrect - which, incidentally, tried to correct "autocorrect" - strikes again!)

    Paul
    #CPLEXOptimizers
    #DecisionOptimization