CityScope / CSL_Hanoi

Repository dedicated to project related to Hanoi City
GNU General Public License v3.0
3 stars 2 forks source link

Use of cellsMap #33

Open benoitgaudou opened 4 years ago

benoitgaudou commented 4 years ago

The variable managing the code coding from scanner is the following one:

map<int,string> cellsMap<-[1::"Aquaculture", 2::"Rice",3::"Vegetables", 4::"Industrial"];

But, this variable is used as follow: cell[i,j].type<-cellsMap.values[id];

This seems that the key of cellsMap is never used. This makes the model hard to update, in particular if we want to manage the -1 value.

agrignard commented 4 years ago

You're right the key is never used. I can change it to a list of string? I don't see how this make the model harder to update?

agrignard commented 4 years ago

Do you prefer this ? https://github.com/CityScope/CSL_Hanoi/commit/539428e47560a86360d4ec8e23c2d68c24803321

IF yes I let you close this issue

Also what do you mean by "This makes the model hard to update"? In term of time of update or if we want to modify it?