# \[AMPL 25000\] Location Problem

**URL:** <https://discuss.ampl.com/t/ampl-25000-location-problem/998>\
**Category:** Google Group Mirror\
**Created:** [March 15, 2024, 5:45am UTC](https://discuss.ampl.com/t/ampl-25000-location-problem/998 "2024-03-15T05:45:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![4er](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/4er/32/530_2.png) [@4er](https://discuss.ampl.com/u/4er)\
**Post date:** [March 15, 2024, 10:27pm UTC](https://discuss.ampl.com/t/ampl-25000-location-problem/998/2 "2024-03-15T22:27:03Z")

</div>

Your constraint named `Constraint_coverage` looks good. Of course, your model needs to also include AMPL statements to define the sets and parameters that are used in the constraint; for example:

```auto
set Sites;
set DemandSites;
param d {DemandSites,Sites};
param demand {DemandSites};

```

I do have some concerns with your objective function `Total_Cost`:

```auto
minimize Total_Cost:
  sum {i in DemandSites, j in Sites, k in Types} F[k} * Xjk[j,k];

```

Of course, `F[k}` should be `F[k]`. More seriously, you are summing over `i` `in` `DemandSites`, but there is no `i` in `F[k]` `*` `Xjk[j,k]`. This could mean that something is missing from the objective expression.

---

_[View the full topic](https://discuss.ampl.com/t/ampl-25000-location-problem/998)._
