# Questions about optmodel constraints

A

#### ayaa

I have three questions:

1. If I have a variable that is stored in a data set and I want to
formulate only one constraint (under optmodel) that is a function of
all the data set's observations of this variable and a decision
variable. Suppose the
variable is a and x is the decision variable. My
constraint is: [(maximum value of a) +x ] / [(minimum value of a) +x ]
< maximum value of (a) / minimum value of (a), can you
help me to include this constraint under optmodel?

2. If there is one scalar number that is a result of certain
calculations and the it is stored in a dataset and I want to equate a
constraint with this scalar, can you help me to do this?

3. If there is one scalar number that is a result of certain
calculations and it is stored in a dataset and I want to include this
scalar in "sum" operator. Suppose there are also two stored variables
that are a and b, and x is a decision variable and the scalar is c, I
want c to appear as in the following constraint:
sum over i for [ c*(ai)^2 * bi/ (ai+x)] = 0.5 , can you help me
to do this under optmodel?

Thanks

Ayaa