Good afternoon,

I need your help to solve the following error please:

I am going to explain a part of the problem first :

**M : set of contracts to be allocated to each project****P : set of n projects****T : set of l time periods****RType : set of resources type (engineer, architect, manager)****S : set of project sizes (SP, MP, LP, XLP) small, medium, large and major.**- set PS within {P,S}; # Set of project-size combinations

We would like to allocate the best fit of contract to a project to minimize both the cost and duration.

**X(i,j) is binary variable = 1 if contract i is allocated to project j and 0 otherwise.****Act(j,t) is a binary variable = 1 if the project j is executing during the period t and 0 otherwise**

**Data :****Av(r, t) is a parameter that indicates the number of resource type r available during the period t****RDemand : demand of resource type r according to the project size s and the contract i (The demand depends on the size of the project and the contract that will be selected)**

The second part of the model is a scheduling part to make sure that the human resources are available to work on the project using the selected contract else the model should select another contract.

The requirement constraint

**My problem is how to express that the contract is the index i when X(i,j)=1**

subject to ReqConstraint {r in RType, t in T}:

sum {(j,s) in PS, j in P, i in M : X[i,j]=1} RDemand[s,i,r]*Act[j,t]<=Av[r,t];

This statement does not work!

Thank’s in advance!!!