# Error in defining a symbolic link

**URL:** <https://discuss.ampl.com/t/error-in-defining-a-symbolic-link/1170>\
**Category:** New to AMPL\
**Tags:** modeling\
**Created:** [July 29, 2024, 10:42pm UTC](https://discuss.ampl.com/t/error-in-defining-a-symbolic-link/1170 "2024-07-29T22:42:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Steve](https://discuss.ampl.com/u/Steve)\
**Post date:** [July 29, 2024, 10:42pm UTC](https://discuss.ampl.com/t/error-in-defining-a-symbolic-link/1170/1 "2024-07-29T22:42:09Z")

</div>

I passed my code through chat-gpt and was told the code should work, but when I try to load my model, I get an error:

```auto
line 1 (offset 9):
        syntax error
context: set grid >>> symbolic; <<<

```

I explained the error to chat-gpt and was told I might have unprintable characters so I ran cat -A on my input file to get:

```auto
set grid symbolic;
set beam in b_supply symbolic;
set beam_options{i in grid} within beam:=beam;
param b_supply{beam} >= 0;
param g_demand{grid} >= 0;
param g_b_bps{grid,beam};
var g_assign{i in grid, j in beam_options} binary;
minimize Aggregate:
    sum({i in grid, j in beam_options} min(0,g_demand[i]/g_b_bps[i,j] - g_assign[i,j]*g_demand[i]/g_b_bps[i,j])) + 
    sum({i in grid, j in beam} g_assign[i,j]*g_demand[i]/g_b_bps[i,j]);
subject to card(g_assign, beam_options) <= 1;
subject to sum({i in grid, j in beam_options} g_assign[i,j]*g_demand[i]/g_b_bps[i,j]) <= b_supply[j];

```

I checked to see if grid was a reserved word and I did not find it on the list. symbolic is a reserved word but I think I am using it correctly.

I am running ampl version: AMPL Version 20240606 (MSVC 19.40.33811.0, 64-bit) which I include because chat-gpt also asked this question.

---

<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:** [July 30, 2024, 12:40am UTC](https://discuss.ampl.com/t/error-in-defining-a-symbolic-link/1170/2 "2024-07-30T00:40:35Z")

</div>

`symbolic` is only a property of parameters: normally, a parameter only takes numerical values, but if it is defined as `symbolic` then it takes character-string values instead.

Any set can contain numerical or string values (or even some numerical values and some string values), so there is no need to define a set as `symbolic`. That’s why a definition like `set` `grid` `symbolic;` is rejected as an error; instead, you should just define `set` `grid;`.
