# \[AMPL 25030\] Formulation VRP code

**URL:** <https://discuss.ampl.com/t/ampl-25030-formulation-vrp-code/1071>\
**Category:** Google Group Mirror\
**Created:** [April 25, 2024, 9:10pm UTC](https://discuss.ampl.com/t/ampl-25030-formulation-vrp-code/1071 "2024-04-25T21:10:45Z")\
**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:** [April 26, 2024, 5:17pm UTC](https://discuss.ampl.com/t/ampl-25030-formulation-vrp-code/1071/2 "2024-04-26T17:17:35Z")

</div>

The difficulty with (4) is that it defines one constraint for each subset of a given set. This cannot be stated explicitly in AMPL, but a way to express it in AMPL is given by the following FAQ entry:

[How can I get AMPL to index over the “power set” consisting of all subsets of a set?](https://discuss.ampl.com/t/how-can-i-get-ampl-to-index-over-the-power-set-consisting-of-all-subsets-of-a-set/61)

Also, it is not clear how V and n are supposed to be related in **(VRP1)**. I would guess that V is the same as 1,\ldots,n, and V-\{1\} is the same as 2,\ldots,n.

---

_[View the full topic](https://discuss.ampl.com/t/ampl-25030-formulation-vrp-code/1071)._
