Location Problem

Skip to first unread message

Eriska Prasetiowati

Mar 15, 2024, 11:14:34 AMMar 15
to AMPL Modeling Language

I am new to ampl. I need your help to review this constraint. I am going to explain a part of the problem :

n  i : set of demand site

n  j : set of candidate site

n  k : set of type station  (large, medium, small)


var X {i in DemandSites, j in Sites} binary; #location that would be build
var Xjk {j in Sites, k in Types} binary; #type of the station would be build

I would like to optimize location model to minimize cost.

minimize Total_Cost:
    sum {i in DemandSites, j in Sites, k in Types} F[k} * Xjk[j,k];
subject to Constraint_coverage {i in DemandSites} :
    sum {j in Sites} d[i,j] * X [i,j] >= demand[i];
Can you help me review that constraint.

AMPL Google Group

Mar 15, 2024, 6:29:16 PMMar 15
to AMPL Modeling Language
Your question has been moved to our new user forum at discuss.ampl.com, and a response has been posted. To see the response, use this link:


To reply, click the red "Reply" button that follows the response. (Do not send an email reply to this message.)

Robert Fourer

We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.
Reply all
Reply to author
0 new messages