[SCIP] How could I access the new constraints created by SCIPbranchVar() ?

Stephen J. Maher s.maher3 at lancaster.ac.uk
Wed Aug 29 09:24:27 CEST 2018


Hi Myroslav,

If you want to branch by imposing a bound of specific variables, then I 
would suggest that you explicitly add a linear constraint that imposes 
this bound. In this way, you are able to store the constraint and then 
retrieve the corresponding dual when performing variable pricing.

The process would be as follows:

- Create a child by calling SCIPcreateChild.
- Create the linear constraint by calling SCIPcreateConsBasicLinear with 
the appropriate LHS and RHS. At this point you can also provide the 
variable to impose the bound. Otherwise, you need to call SCIPaddCoefLinear.
- Add the newly created constraint to the newly created child node by 
calling SCIPaddConsNode
- Store the newly created constraint in probdata or vardata.
- Repeat these steps for the other children of this node.

Cheers,

Steve

On 21/08/18 16:16, myroslav wrote:
> I guess I need to access constraints corresponding to the variable's 
> bounds and then use SCIPgetDualsolVarbound() method to get the dual 
> value  but I could not figure out how to get constraints corresponding 
> to the variable's bounds.
> 
> Sincerely,
> 
> Myroslav
> 
> 
> On 21/08/2018 16:40, myroslav wrote:
>> Dear SCIP community,
>>
>>
>> I am trying to implement a simple branch-and-price algorithm. In the 
>> branching callback SCIP_DECL_BRANCHEXECLP I am using SCIPbranchVar() 
>> method to perform branching on one of the LP candidates obtained by 
>> the method SCIPgetLPBranchCands(). When branching on a variable in 
>> this way a new constraint is added in one of the two (the up-branch or 
>> the down-branch) branches and I should modify my pricing problem 
>> accordingly. How could I access the new constraints created by 
>> SCIPbranchVar() so that I could use them to get their dual variables 
>> when solving the pricing problem?
>>
>>
>> Thanks,
>>
>> Myroslav
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> https://listserv.zib.de/mailman/listinfo/scip
>>
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip


More information about the Scip mailing list