You need to have a .dat file in your directory containing the data required for filling the instance
for example :
Ex1: You do have a parameter called cap in your model
and this parameter is defined over two sets called i,j where
i belongs to {0,1,2,3,4,5,6}
j belongs to {0,1,2,3,4,5,6}
model.cap = Param(model.i,model.j, within=Reals, mutable=True)
You just need to create a file with .dat extension and indicate the value for each combination of i and j (as a table) like this :
param cap : 0 1 2 3 4 5 6 :=
0 0 3 3 4 0 0 0
1 0 0 0 0 2 0 0
2 0 10 0 0 1 0 0
3 0 0 0 0 0 5 0
4 0 0 0 0 0 1 2
5 0 0 0 0 0 0 5
6 0 0 0 0 0 0 0;This will feed the cap values as well as the sets i,j to the model
Ex2: You do have a parameter called N in your model
and this parameter is a constant number and has no set
model.N = Param(mutable=True)
You just need to create a file with .dat extension and indicate the value of N like this :
param N:=8;
Ex3: You do have a parameter called R over he set i in your model
i belongs to {0,1,2,3,4,5,6}
model.R = Param(model.i)
You just need to create a file with .dat extension and indicate the value of R for each element of i like this :
param: i:
R:=
1 2
2 1.2
3 1.8
4 0.9
5 3.2
6 0.7;This will feed the R values as well as the set i to the model