Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interfaces instead of enums #174

Open
sebhoerl opened this issue Nov 13, 2018 · 3 comments
Open

Interfaces instead of enums #174

sebhoerl opened this issue Nov 13, 2018 · 3 comments

Comments

@sebhoerl
Copy link
Collaborator

Often, Amodeus uses Enums at strange locations. For instance, I see that there is a
MatsimShapeFileVirtualNetworkCreator
that I find in one old run script for a paper. Now I want to check if there is a different one, that creates me a VirtualNetwork on the fly. The "natural" Java way (in my opinion) would now be to go to MATSimShapeFileVirtualNetworkCreator, find the interface that it implements (which would be VirtualNetworkCreator) and then check for the implementations. The way it is now I have to look though the whole project to find a class (/enum) that does what I want, but without any indication that it has a certain purpose (i.e. creating a network). I think Amodeus does this not only in this case but in several other places.

@sebhoerl
Copy link
Collaborator Author

Which, in turn, also leads to the situation that KMeansVirtualNetworkCreator works completely different than the other creator... it doesn't even have a public interface to create the network.

@sebhoerl
Copy link
Collaborator Author

And now I found it... there is a MatsimKMeansVirtualNetworkCreator, which does the trick. But I think this example illustrates quite well what I mean initially ;-)

@TheFrok
Copy link

TheFrok commented Mar 30, 2020

Hi,
I second that comment. I, also, had little hard time finding the implementation for the different virtual network creators. Although, I want to add that after I found the VirtualNetworkCreators, it was pretty straight forward looking for the PopulationCutters.
So this might be solved with a documentation for amodeusOptions.properties.

Hope I'm not intruding the discussion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants