Skip to content

One of the constraints evaluates to a FALSE LOGICAL variable. Your model is infeasible #1327

Discussion options

You must be logged in to vote

Something evaluates to something like 1==0

sdpvar x
y = x+1
x >= y
Error using >=
Error using constraint
Inequality constraint evaluated to trivial false (no decision variable in constraint)

Also, the use of short-circuit && appears odd since it should not work

x>=1 && x<=2
The following error occurred converting from constraint to logical:
Conversion to logical from constraint is not possible.

as you must use &

x>=1 & x<=2
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| ID| Constraint| Coefficient range|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| #1| Element-wise inequality 1x1| 1 to 1|
| #2| Element-wise inequality 1x1| 1 to 2|
++++++++++++++++…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@johanlofberg
Comment options

Answer selected by johanlofberg
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants