I want to move from using C++ to using Python however, I can't seem to find what the Python equivalent of IloExpr from the C++ API to Cplex is.

More specifically, I'd like to write the following function in Python...

IloExpr targetSetLHS(IloEnv & env, Sparse_Matrix<IloInt>& vox, vector<unsigned int> & A,
    IloNum Tx, vector<unsigned int> & X, IloNumVarArray& w)
    IloExpr expr(env);
    for (unsigned int i = 0; i < A.size(); ++i)
        expr += D(A[i], vox, w, env) - Tx;
    return expr;

Naturally, I checked the documentation for the Python API but I can't find anything of the sort and I'm wondering if what I am trying to do is even possible.

asked 10 Jun '15, 12:00

Nevelli's gravatar image

accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 10 Jun '15, 12:00

Seen: 561 times

Last updated: 10 Jun '15, 12:00

OR-Exchange! Your site for questions, answers, and announcements about operations research.