title: column wise modelling in Concert technology- Column generation
body: <p>I want to use a column wise approach to model my problem within the column generation framework. IBM itself provides a simple example with two constraints and three variables to do so (please find the example below). In this example, first the range constraints is created and then the variables is created and added to the ranges.</p>
  
  <p>My question is that how I can write such a model in a parametric way assuming we have m variables and n constraints? I need to write this model in a parametric way since I may have plenty of constraints and variables in my model and it is not possible to simply create a variable as stated in the Cplex example.</p>
  
  <p>To add the coefficient of a variable used at the associated constraints, I tried the  following command. But It didn't work out.</p>
  
  <pre><code>    IloNumArray lowerbound(env,0 , 0, ILOINT);
      IloNumArray upperbound(env,1,1, ILOINT);
  
  IloRangeArray  JobsAssignments = IloAdd(MasterModel, IloRangeArray(env, lowerbound, upperbound));
      IloNumVarArray Assignment(env);
  
      IloNumVarArray temp(env);
  
      for (j = 0; j &lt; nbJobs; j++)
      {
          temp.add(JobsAssignments[j](x));//assigning a coefficient to the variable "JobsAssignments" for each constraint j
      }
  
      Assignment.add(IloNumVar(TotalProfit(x) + temp));//assignment constraint
  </code></pre>
  
  <p>The example provided by IBM at the Cplex directory:</p>
  
  <pre><code>    IloEnv env = model.getEnv();
  
     IloObjective obj = IloMaximize(env);
     c.add(IloRange(env, -IloInfinity, 20.0, "constraint 1"));
     c.add(IloRange(env, -IloInfinity, 30.0, "constraint 2"));
  
     x.add(IloNumVar(obj(1.0) + c[0](-1.0) + c[1]( 1.0), 0.0, 40.0));
     x.add(IloNumVar(obj(2.0) + c[0]( 1.0) + c[1](-3.0)));
     x.add(IloNumVar(obj(3.0) + c[0]( 1.0) + c[1]( 1.0)));
     x[0].setName("x1");
     x[1].setName("x2");
     x[2].setName("x3");
  
     model.add(obj);
     model.add(c);
  </code></pre>