[Dip-tickets] [Dip] #32: make api for master-only vars more simple

Dip coin-trac at coin-or.org
Sun Aug 1 22:26:54 EDT 2010


#32: make api for master-only vars more simple
------------------------+---------------------------------------------------
Reporter:  mgalati      |     Owner:       
    Type:  enhancement  |    Status:  new  
Priority:  minor        |   Version:  trunk
Keywords:               |  
------------------------+---------------------------------------------------
 Good question...  It's actually a bit messy to deal with this because of
 the way the framework is designed.

 I don't have any explicit (simple) examples of this and should probably
 add one. For now, you can look at MILPBlock which deals with this case. I
 call it "master-only vars".

 Look at MILPBlock_DecompApp::createModelMasterOnlys2( ) as an example of
 how to deal with this. Essentially, I just need the LB and UB of the vars.
 But since the design is driven off the DecompConstraintSet object, you
 need to declare an empty object for each var. I should probably make this
 easier for the user by just asking for a list of them. I’ll add a ticket
 to fix that in future.

    for(vit = masterOnlyCols.begin(); vit != masterOnlyCols.end(); vit++){
       i = *vit;

       //THINK:
       //  what-if master-only var is integer and bound is not at integer

       DecompConstraintSet * model = new DecompConstraintSet();
       model->m_masterOnly      = true;
       model->m_masterOnlyIndex = i;
       model->m_masterOnlyLB    = colLB[i];
       model->m_masterOnlyUB    = colUB[i];
       //0=cont, 1=integer
       model->m_masterOnlyIsInt = integerVars[i] ? true : false;
       if(m_appParam.ColumnUB <  1.0e15)
          if(colUB[i] >  1.0e15)
             model->m_masterOnlyUB = m_appParam.ColumnUB;
       if(m_appParam.ColumnLB > -1.0e15)
          if(colLB[i] < -1.0e15)
             model->m_masterOnlyLB = m_appParam.ColumnLB;

       m_modelR.insert(make_pair(nBlocks, model));
       setModelRelax(model,
                     "master_only" + UtilIntToStr(i), nBlocks);
       nBlocks++;
    }



 > -----Original Message-----
 > From: Kipp Martin [mailto:kmartin at chicagobooth.edu]
 > Sent: Saturday, July 31, 2010 3:20 AM
 > To: Matthew Galati
 > Subject: Re: Dip Questions
 >
 > Hi Matt:
 >
 > In my application I have a set variables in the core constraints that do
 not
 > appear in any of the blocks. So something like this
 >
 > min cx
 >
 > s.t
 >
 > A'x >= b1
 > A''x + By >= b2
 >
 > I assume that this will not mess things up, correct?
 >
 > Thanks
 >
 >

-- 
Ticket URL: <https://projects.coin-or.org/Dip/ticket/32>
Dip <https://projects.coin-or.org/Dip>
An extensible software framework for implementing decompositon-based bounding algorithms for use in solving large-scale discrete optimization problems.



More information about the Dip-tickets mailing list