Using java to create a logistic model - arrays and properties

Posted by Oliver Burdekin on Stack Overflow See other posts from Stack Overflow or by Oliver Burdekin
Published on 2012-07-07T20:50:54Z Indexed on 2012/07/07 21:15 UTC
Read the original article Hit count: 174

Filed under:
|
|
|

I'm currently trying to create a java model that will solve a problem we have. On a voluntary expedition each week we have some people leaving and some new people arriving. Accommodation is in tents. The tents sleep different numbers of people and certain rules apply. Males and females cannot be mixed and volunteers can be one of four types -

school children/ research assistants/ scientific staff/ school teachers

So types of volunteer and sexes cannot be mixed. Each week the manager spends hours trying to work this out so I've offered to make this model to keep my coding skills up.

At present I'm working with arrays. Each tent is a 2D array [4][x] where x is the number of people it sleeps (each person sleeping there has 4 attributes). Each person is a 1D array with 4 attributes [4]. The idea is to check where people can go, cause the minimum movement for people staying on and solve this logistic problem.

Does anyone have any better suggestions as to how to solve this? At present I'm finding it necessary to write a lot of code setting up and querying arrays. Any help is appreciated.

© Stack Overflow or respective owner

Related posts about arrays

Related posts about model