[Osi] does setInteger() distinguish between Binary and general Integer?

Laszlo Ladanyi ladanyi at us.ibm.com
Fri Jul 17 17:36:24 EDT 2009


Hi Michael,

Setting lb/ub to 0/1 *and* setting integrality will specify that a 
variable is binary. getColType() looks at all three values to decide 
the type of the variable, but to set something to binary you got to 
set all three values.

--Laci

On Fri, 17 Jul 2009, Michael Chen wrote:

> Dear there,
>
> I am using OsiCbcSolverInterface, and want to set certain variables to
> Binary and others to general Integer. however I can only see the method
>
> setInteger(int index);
>
> however the method
>
> getColType();
>
> does distinguish them:
>
>    /**  Return array of column length
>         0 - continuous
>         1 - binary (may get fixed to 0 or 1 later)
>         2 - general integer (may get fixed later)
>    */
>    virtual const char * getColType(bool refresh=false) const;
>
>
>
> -- 
> Best regards,
> Michael Chen
> Google Voice Phone.: 847-448-0647
>




More information about the Osi mailing list