Dear colleagues, since the operation below is the same in a different order, but it does not work, two questions come to my mind: why it does not work? how can be made without intermediate steps? Thanks and happy Sunday
*I want to create a new parameter with the share of each area type in my regions,
sets region/world,myregion/,area/urban,forest,riverside/;
parameter
myparameter(region,area)
share_of_each_area(region,area);
myparameter(region,area)=normal(7,2);
display myparameter;
*an option to obtain the desired share is to create another parameter with the total and divide by it
parameter total_area(region);
total_area(region)= sum(area,myparameter(region,area));
display total_area;
share_of_each_area(region,area)=myparameter(region,area)/total_area(region);
display share_of_each_area;
*I would like to do it without the intermediate step of creating a parameter for the total amount, but I get an error in the following code, which is the same in another order
share_of_each_area(region,area)=myparameter(region,area)/sum(area,myparameter(region,area));
display share_of_each_area;
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.