[SCIP] Missing variable

m.noorizadegan at gmail.com m.noorizadegan at gmail.com
Fri Mar 11 20:39:41 CET 2022


Hi Marco and Ambros,

Thanks for your replies.

I defined q in master and add them to some constraints. I can see them in the lp file generated in the initial master problem (before going through the pricer).
But they disappear in the lp file generated after adding the first set of improving columns.
For example I have constraint: AR_1: q_1<=0 in the initial master, then in the first iteration (after adding the first improving columns) it should be AR_1: q_1-z_1<=0
But what I get is AR_1: -z_1<=1.
q_1 has to appear in AR_1 in both lp files.

I am using an old version SCIP 3.1.
Can it be the issue?

Best,
Mahdi


-----Original Message-----
From: Marco Lübbecke <marco.luebbecke at rwth-aachen.de> 
Sent: 10 March 2022 08:30
To: Mahdi Noorizadegan <m.noorizadegan at gmail.com>
Subject: Re: [SCIP] Missing variable

Hi Madhi,

aren't the variables you have in the master and those that you use in the pricing completely DIFFERENT variables?

All the best, Marco

Am Fr., 4. März 2022 um 00:24 Uhr schrieb Mahdi Noorizadegan
<m.noorizadegan at gmail.com>:
>
> Hi Scipers,
>
> I am writing a branch and price model using VRP example as template.
>
> I have two vectors of variables and two constraints defined in the master problem and new variables are added in the pricer.
> I can see both variables in the lp file created in the master problem but some variables are missing in the lp file created in pricer.
>
> Below are the definitions for variables (partly lost in the pricer) and the constraint.
>
> What could be the problem and how can I fix it?
>
> I would appreciate it if you could help me to fix this.
>
> Best,
> Mahdi
>
> vector<vector<SCIP_VAR* > >q( n );
>     for (int l=0; l<n; ++l) {
>         q[l].resize(n_d);
>         i
>         for (int d=0; d<n_d; ++d) {
>             SCIP_VAR* var;
>
>
>
>             (void) SCIPsnprintf(var_name, 255, "q_%d_%d”, l,d);
>
>
>
>             SCIP_CALL( SCIPcreateVar(scip,
>                                      &var,                   // returns new index
>                                      var_name,               // name
>                                      0.0,                    // lower bound
>                                      1.0,                    // upper bound
>                                      0,                     // objective
>                                      SCIP_VARTYPE_INTEGER,   // variable type
>                                      true,                   // initial
>                                      false,                  // forget the rest ...
>                                      NULL, NULL, NULL, NULL, NULL) );
>             SCIP_CALL( SCIPaddVar(scip, var) );
>             q[l][d] = var;
>
>         }
>     }
>
>
>  vector<vector<SCIP_CONS*> > AR(n);
>     for (int l = 0; l < n; ++l)
>     {
>         ActivityRoom1[l].resize(n_d  );
>
>         for (int d = 0; d < n_d; ++d)
>         {
>             SCIP_CONS* con;
>             (void) SCIPsnprintf(con_name, 255, “AR%d_%d", l,d);
>
>
>
>
>
>             SCIP_CALL( SCIPcreateConsLinear(scip, &con, con_name, 0, 0, 0,
>                                             -SCIPinfinity(scip),                    /* lhs */
>                                             0,     /* rhs */
>                                             true,                   /* initial */
>                                             false,                  /* separate */
>                                             true,                   /* enforce */
>                                             true,                   /* check */
>                                             true,                   /* propagate */
>                                             false,                  /* local */
>                                             true,                   /* modifiable */
>                                             false,                  /* dynamic */
>                                             false,                  /* removable */
>                                             false) );               /* stickingatnode */
>             SCIP_CALL( SCIPaddCons(scip, con) );
>             AR[l][d] = con;
>
>                      SCIP_CALL( SCIPaddCoefLinear(scip, con, q[l][d] , -1.0) );
>                   }
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip



--
Prof. Dr. Marco Lübbecke
RWTH Aachen University
Chair of Operations Research
Kackertstrasse 7
D-52072 Aachen
Germany

fon / fax: +49 241 80-93362 / 92369
marco.luebbecke at rwth-aachen.de
www.or.rwth-aachen.de/luebbecke




More information about the Scip mailing list