private void init()
        {
            DataReader      dr       = new SyntheticData();
            CellDescription cellData = dr.FetchData();

            travellingDistance = cellData.TravellingTimeArm1; //LUDDE: Why is this set to Arm1's Travelling arrivalTime?

            // number of vehicles we have
            nbRoutes = 3;

            // number of visists we have to make
            nbNodes = 58 + nbRoutes * 2;

            List <int> initStarts = new List <int>();
            List <int> initEnds   = new List <int>();

            // ENDS AND STARTS NEED TO BE IN THE BEGINNING!
            for (int i = 0; i < nbRoutes; i++)
            {
                initStarts.Add(i);
                initEnds.Add(i + nbRoutes);
            }

            starts  = initStarts.ToArray();
            ends    = initEnds.ToArray();
            routing = new RoutingModel(nbNodes, nbRoutes, starts, ends);
        }
Esempio n. 2
0
        public ThesisProgram()
        {
            this.homeFolder = System.IO.Directory.GetCurrentDirectory();
            while (!System.IO.Directory.Exists(homeFolder + "\\ProblemData"))
            {
                homeFolder = System.IO.Directory.GetParent(homeFolder).FullName;
            }
            string destinationFolder = homeFolder + "\\ProblemData\\";

            problemDescriptionFile = destinationFolder + "problemdescription";
            cellData    = new FileInputData(new InputData(problemDescriptionFile)).FetchData();
            inputParams = new SolverInputParameters();
        }
Esempio n. 3
0
        public void testComponentPickups()
        {
            string          problemDescription = "C:\\Dropbox\\skola\\Exjobb\\testparameters\\problemdescription";
            CellDescription cellDataChange     = null;

            for (int i = 1; i <= 6; i++)
            {
                string testFile = problemDescription + i;
                cellDataChange = new FileInputData(new InputData(testFile)).FetchData();
                for (int j = 0; j < 15; j++)
                {
                    ConstraintProblem csp = new ConstraintProblem(cellDataChange, inputParams);
                    csp.Solve();
                }
            }
        }
 public Node(int nodeId, CellDescription _parent)
 {
     parent = _parent;
     Id     = nodeId;
 }