help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] constraint to binary variable


From: dayana
Subject: [Help-glpk] constraint to binary variable
Date: Thu, 20 Jun 2013 15:28:42 -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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]