Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Constraint Programming +NN in CP optimizer

  • 1.  Constraint Programming +NN in CP optimizer

    Posted Sat February 13, 2016 01:37 PM

    Originally posted by: FiFila


    Hi;

    I have some question about application of constraint programming and I am in the first step of solving a problem.

    I want to model by CP optimizer and NN a problem (I want to improve the NN by combination of it with constraint programming). As the input of NN is not linear, I can not use CPLEX, I have force to use a CP optimizer. Because I am in primary steps of learning a CP optimizer, would you please send me a sample or reference to see how I can model some constraints by CP optimizer as  a nonlinear input of  my NN.

    Cheers


    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Constraint Programming +NN in CP optimizer

    Posted Wed February 17, 2016 06:30 AM

    Hi,

    you should have a look at the floatexpr example:

    // --------------------------------------------------------------------------
    // Licensed Materials - Property of IBM
    //
    // 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55
    // Copyright IBM Corporation 1998, 2013. All Rights Reserved.
    //
    // Note to U.S. Government Users Restricted Rights:
    // Use, duplication or disclosure restricted by GSA ADP Schedule
    // Contract with IBM Corp.
    // --------------------------------------------------------------------------

    using CP;

    dvar int i in 1..100;
    dvar int j in 1..100;
    dvar int k in 1..99;

    dexpr float kf = k/100;
    dexpr float ar[i in 1..10] = k/i;

    minimize kf + sum(i in 1..10)ar[i];

    subject to {
       i*(1+kf) == j;
    }

    tuple solutionT{
        int i;
        int j;
        int k;
    };

    {solutionT} solution = {};
    execute{
    solution.add(i,j,k);
    writeln(solution);
    }

    regards


    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: Constraint Programming +NN in CP optimizer

    Posted Wed March 16, 2016 10:33 PM

    Originally posted by: FiFila


    Hi Alex;

    Thanks for your reply but I have some nonlinear equation, I should model my constraint and objective. I should work with { iloconstraint and model.add}

    Would you please give me some more guidance?

     

    Best regards

    Fila


    #ConstraintProgramming-General
    #DecisionOptimization