Hello,
I am having some troubles implementing indicator-constraints in my mixed integer linear program ( MILP ). I am using the following code where K and J are some integers:
z = m.binary_var_matrix( J , K , 'z' )t = m.binary_var_list( K , name = 't' )for k in K: m.add_indicator( t [ k ] , ( m.sum ( z [ j , k ] for j in J ) >= 1 ) , active_value = 1 )I want to check whether the sum over the z variables is greater or equal to 1 for each k. When I run m.number_of_indicator_constraints I do see that the indicator constraints are added to my model but when I solve the problem all values of t ( my indicator ) are equal to 0, while for some k the sum over z [ j , k ] >= 1, such that the some values of t should equal 1. Is there something I am missing in my implementation or do I have to use a different function?
Thank you in advance!
Lourens
------------------------------
Lourens
------------------------------
#DecisionOptimization