Menu

Solver Help

Help
Mike
2016-05-09
2016-05-09
  • Mike

    Mike - 2016-05-09

    Delete

     

    Last edit: Mike 2016-05-09
  • kris

    kris - 2016-05-09

    Hi Mike!

    To solve the problem (or trying to solve it) you need to search for a solution. This can be defined in a simplest way as follows.

    DepthFirstSearch<FloatVar> label = new DepthFirstSearch<FloatVar>();
    SplitSelectFloat<FloatVar> s = new SplitSelectFloat<FloatVar>(store, xs, null);
    label.setAssignSolution(true);
    
    label.labeling(store, s);
    

    where xs is a vector of FloatVar to be assigned. You need to collect all decision variables here. In the SplitSelectFloat class you can also define variable selection method that can improve performance. For more examples, you can refer to org.jacop.examples.floats. There are also examples for minimization of a given cost function.

    Best regards,
    /Kris

     
  • Mike

    Mike - 2016-05-09

    delete

     

    Last edit: Mike 2016-05-09
  • Mike

    Mike - 2016-05-09

    Thanks Kris, got it working!

     

Log in to post a comment.