How to create a set of two parameters where the values are binary

17 views
Skip to first unread message

issab...@gmail.com

unread,
Jul 28, 2016, 9:00:20 PM7/28/16
to AMPL Modeling Language
Hello everyone ! I am new to AMPL and this is my first post , thank you in advance for any suggestions or help . 
I have a matrix for two parameters let's say job and tool , as the following 

      t1   t2   t3                       
j1   1    0     1                        
j2   0    1     1
j3   1    1     0 
j4   0    0     1  ... etc 

 the simple explanation is that job1 can be used by t1 and t3 to be processed , j2 uses t2 and t3 ..etc so my question is how can i write this in AMPL to use the set let's say 
set A; to use later in this constraint   {h in 1..H} : sum {m in 1..M,j in A} p[j,m] * X[j,h,m] <= TL[t] * TC[t]; where h is the number of periods, j number of jobs, m numbers of modes( different processing time for each mode) and t number of tools and X is a binary decision variable.  

Any help would be much appreciated ,
Thank you 
 

Victor Zverovich

unread,
Jul 29, 2016, 2:42:11 PM7/29/16
to am...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages