-------- Forwarded Message -------- From: dayana <d_w_812...@yahoo.com> To: Help-glpk@gnu.org Subject: [Help-glpk] constraint to binary variable Date: Thu, 20 Jun 2013 12:14:22 -0700 (PDT)
Hi everyone, I am new in GLPK. I want to fill a two dimensional array of variable with 0 or 1. But I will get all of it zero :-( any idea? # if start_time[i] <= t ---> Is_runing[i,t] = 1 s.t. check_3_1_1{i in task_no,t in time}: start_time[i] <= t + Big_M * (1-is_runing[i,t]) ; # if start_time[i] > t ---> Is_runing[i,t] = 0 s.t. check_3_1_2{i in task_no,t in time}: start_time[i] <= t + Big_M * (is_runing[i,t]) ; # if start_time[i]+duration[i] >= t ---> Is_runing[i,t] = 1 s.t. check_3_1_4{i in task_no,t in time}: start_time[i] + duration[i] >= t + Big_M *(1- is_runing[i,t]); # if start_time[i]+duration[i] < t ---> Is_runing[i,t] = 0 s.t. check_3_1_3{i in task_no,t in time}: start_time[i] + duration[i] <= t + Big_M * is_runing[i,t]; -- View this message in context: http://old.nabble.com/constraint-to-binary-variable-tp35649655p35649655.html Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com. _______________________________________________ Help-glpk mailing list Help-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/help-glpk