Hello,

I tried to change the "OptaPlannerSyncSolverTest" function to solve Vehicle
Routing Problem instead of CloudBalancing

CloudBalance:
       CloudBalancingGenerator generator = new
CloudBalancingGenerator(true);
        final CloudBalance planningProblem = generator.createCloudBalance(4,
12);
        assertNull(planningProblem.getScore());
        assertNull(planningProblem.getProcessList().get(0).getComputer());

        CloudBalance bestSolution = (CloudBalance)
template.requestBody("direct:in", planningProblem);

        assertEquals(4, bestSolution.getComputerList().size());
        assertEquals(12, bestSolution.getProcessList().size());
        assertNotNull(bestSolution.getScore());
        assertTrue(bestSolution.getScore().isFeasible());
        assertNotNull(bestSolution.getProcessList().get(0).getComputer());

My Code:
        VehicleRoutingImporter Importer = new VehicleRoutingImporter(true);
        File inputFile1 = new File(file);
        VehicleRoutingSolution unsolvedCloudBalance =
(VehicleRoutingSolution) Importer.readSolution(inputFile1);
        VehicleRoutingSolution solvedCloudBalance = (VehicleRoutingSolution)
template.requestBody("direct:in", unsolvedCloudBalance);

It crashes within the last line, it's CastingError Exception...any idea why?

Thanks 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-Optaplanner-Component-tp5773140.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to