[Osi] Gurobi setting parameters

Stefan Vigerske stefan at math.hu-berlin.de
Fri Mar 31 07:55:37 EDT 2017


Hi,

I use

GRBenv* grbenv = 
GRBgetenv(osigrb->getLpPtr(OsiGrbSolverInterface::KEEPCACHED_ALL));
GRBsetdblparam(grbenv, GRB_DBL_PAR_MIPGAP, 0.1);

Stefan

On 03/31/2017 11:45 AM, Yacine Gaoua wrote:
> Thank you Stefan.
> its working very well.
> another question about setting Gurobi parameters. i using  GRBsetdblparam(si->getEnvironmentPtr(), GRB_DBL_ATTR_MIPGAP, this->optimizationGap); but it dosent work, may be its not the good way t define it.
> Thank you in advanceYacine,
>
>
>       De : Stefan Vigerske <stefan at math.hu-berlin.de>
>  À : Yacine Gaoua <y.gaoua at yahoo.com>; "osi at list.coin-or.org" <osi at list.coin-or.org>
>  Envoyé le : Vendredi 31 mars 2017 11h04
>  Objet : Re: [Osi] OsiGrbSolverInterface Bug
>
> Hi.
>
> handling the exception may give some insight.
> try
> {
>   OsiSolverInterface *si= new OsiGrbSolverInterface();
> }
> catch( CoinError& error )
> {
>   std::cout << error.message();
> }
>
> Could be a missing Gurobi license.
>
> Stefan
>
> On 03/31/2017 08:42 AM, Yacine Gaoua wrote:
>> Hi,
>> I am using Gurobi Osi interface to solve my problem on vc++ 2010. But when i call solving method, Gurobi stop running whith an error message => (Unhandled exception to 0x751fc54f in smart_grid_CoinOR.exe: Microsoft C ++ Exception: CoinError to memory location 0x0045f010 ..).
>> For th rest of Solvers (CPLEX, XPRESS, MOSEK) it running well.
>> int main(){
>>   //OsiSolverInterface *si= new OsiCpxSolverInterface();  //OsiSolverInterface *si= new OsiXprSolverInterface();  //OsiSolverInterface *si= new OsiMskSolverInterface();
>>   OsiSolverInterface *si= new OsiGrbSolverInterface(); //Error
>>   si->readLp("test1.lp");  si->branchAndBound();
>> return 0;}
>> Thanks for help
>>
>>
>>
>> _______________________________________________
>> Osi mailing list
>> Osi at list.coin-or.org
>> https://list.coin-or.org/mailman/listinfo/osi
>>
>
>


-- 
http://www.gams.com/~stefan


More information about the Osi mailing list