2

I'm a total beginner with CPLEX and OPL, so maybe someone can help me with the coding of a mixed integer programming model. I finished the model and the data. When I run the configuration I get 44 errors, including "opl cannot extract expression", "CPLEX (default) cannont extract expression" for my objective function and some of the constraints. I really do not know how to solve these errors, so maybe someone can help me out here.

Unfortunately, my interface language is German. Can someone tell me how to change it to English so I can post the errors in a language more people can understand?

Here you can find the code of the objective function and the constraints that are named in the error section, and a screenshot of the errors (in German).

model enter image description here

1 Answer 1

3

First, to launch the cplex opl ide in English you may do in command line oplide -nl en and see

https://www.ibm.com/support/knowledgecenter/SSSA5P_12.8.0/ilog.odms.ide.help/OPL_Studio/globalization/topics/opl_globaliz_overriding_settings.html

for more.

Now about your error, cannot extract. Are your constraints linear? I see a product and I d like to remind you that if x and y are decision variables then x times y is not linear.

PS: there's a similar question at https://developer.ibm.com/answers/questions/494538/error-cplex-default-cannot-extract-expression-opl.html?utm_campaign=answers&utm_medium=email&utm_source=answers-new-question&utm_content=answers-answer-question++

Sign up to request clarification or add additional context in comments.

5 Comments

Hi Alex, Thank you very much for your answer and your help. I solved the problem by ordering the indexes in a consistent way and the errors are solved now. But now I have another error 5002: Constraint NB(4) is not convex. So you are right, there are two decision variables in the product of this constraint. But can you help me with solving this? how can I rewrite the constraint to make it linear? Thanks so much for your help in advance.
Thank again for your help regarding the linearity of my constraints. I corrected it and it worked. But I get only a solution which is a feasible relaxed sum of infeasibilities. And some of the decisionvariables which are defined to not be negative, have negative values. I guess there is a major mistake in my model. Can you help to find the error please?
About the variables that should be non negative and are negative , I guess your model is not feasible and then cplex relaxed it. See ibm.com/developerworks/community/forums/html/… if you want not to see that
thanks for your answer. I had a look at the relaxations and conflicts and after deleting one constraint, the solution was optimal. So that's good. But unfortunately, the solutions for the decision variables is not right without the contraint I deleted.. I deleted the contraint that conserves the flow of product between the different stages of the supply chain. without the constraint, the product there is only product flow between the distribtion centers and the demand points, but not between the other stages. Do you know how I could find out how to fix this?
well, maybe your model is not feasible and then you should add more freedom in order to get a feasible solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.