Topic
  • 4 replies
  • Latest Post - ‏2013-12-30T22:07:39Z by memop
memop
memop
8 Posts

Pinned topic External Objective Function

‏2013-12-30T13:23:01Z |

Hello,

I am trying to write a CP model with a production system problem. And I want to use a integrated approximation algorithm within the CP model to measure the system performance. My proposed method is: 

1) A CP model generates all of the possible configurations related to the problem. 

2) Performance measurements are computed using a approximation algorithm iteratively.

3) A model is selected a optimum/feasible solution. 

 

I want to use performance measurement values as objective function. However I could not achieved. If the objective function is not related to any constraints, the error message is received. Does the objective function has to be mentioned in subject to block? 

  • GGR
    GGR
    77 Posts
    ACCEPTED ANSWER

    Re: External Objective Function

    ‏2013-12-30T16:09:28Z  
    • memop
    • ‏2013-12-30T15:03:49Z

    Thank you very much CGR.

    I have examined the vellino sample in detail. If you can look vellinochosenBin.mod file in the sample, the objective function is associated with the demand constraint. But my objective function is not related to any constraints.

    I hope I made myself clear

     

    Regards. 

    Hi

    The objective constraint for a CP Optimizer model is an arithmetical expression of the variables of the model. in the vellinochosenBin model  the array of variables that defines the capacity of the bins from the assignment of the components production among the bins. That is the integer variables array produce in the sample. Beside the model and the objective terms are linear and the model is solved by the Cplex engine.

    For a CP model you can use whatever arithmetical operators (sum, min, max) or function (square, square root, log, /) and some arithmetical constraints such as x <= 5, y != 1, .... In the latest case the constraint is cast in a Boolean expression whose value is 1 is the constraint is enforced in the solution (e.g. if x is assigned to 4 the value of x < 5 is 1), zero elsewhere.

    I may not have understood your need, please tell me more.

     

    Hope that helps

  • GGR
    GGR
    77 Posts

    Re: External Objective Function

    ‏2013-12-30T14:49:23Z  

    Hi

     

    If I understand your proposal, you create a CP model on which you iterate solution as configurations for the main problem to solve. Then each configuration is evaluated thanks to am approximation algorithm. That is an algorithm that is independent from the solvers available in OPL (Cplex and CP Optimizer) 

    In such a case, you can have a look to the distributed sample vellino in which the function next on the CP solver is illustrated.

    Hope that helps

     

  • memop
    memop
    8 Posts

    Re: External Objective Function

    ‏2013-12-30T15:03:49Z  
    • GGR
    • ‏2013-12-30T14:49:23Z

    Hi

     

    If I understand your proposal, you create a CP model on which you iterate solution as configurations for the main problem to solve. Then each configuration is evaluated thanks to am approximation algorithm. That is an algorithm that is independent from the solvers available in OPL (Cplex and CP Optimizer) 

    In such a case, you can have a look to the distributed sample vellino in which the function next on the CP solver is illustrated.

    Hope that helps

     

    Thank you very much CGR.

    I have examined the vellino sample in detail. If you can look vellinochosenBin.mod file in the sample, the objective function is associated with the demand constraint. But my objective function is not related to any constraints.

    I hope I made myself clear

     

    Regards. 

    Updated on 2013-12-30T15:04:19Z at 2013-12-30T15:04:19Z by memop
  • GGR
    GGR
    77 Posts

    Re: External Objective Function

    ‏2013-12-30T16:09:28Z  
    • memop
    • ‏2013-12-30T15:03:49Z

    Thank you very much CGR.

    I have examined the vellino sample in detail. If you can look vellinochosenBin.mod file in the sample, the objective function is associated with the demand constraint. But my objective function is not related to any constraints.

    I hope I made myself clear

     

    Regards. 

    Hi

    The objective constraint for a CP Optimizer model is an arithmetical expression of the variables of the model. in the vellinochosenBin model  the array of variables that defines the capacity of the bins from the assignment of the components production among the bins. That is the integer variables array produce in the sample. Beside the model and the objective terms are linear and the model is solved by the Cplex engine.

    For a CP model you can use whatever arithmetical operators (sum, min, max) or function (square, square root, log, /) and some arithmetical constraints such as x <= 5, y != 1, .... In the latest case the constraint is cast in a Boolean expression whose value is 1 is the constraint is enforced in the solution (e.g. if x is assigned to 4 the value of x < 5 is 1), zero elsewhere.

    I may not have understood your need, please tell me more.

     

    Hope that helps

  • memop
    memop
    8 Posts

    Re: External Objective Function

    ‏2013-12-30T22:07:39Z  
    • GGR
    • ‏2013-12-30T16:09:28Z

    Hi

    The objective constraint for a CP Optimizer model is an arithmetical expression of the variables of the model. in the vellinochosenBin model  the array of variables that defines the capacity of the bins from the assignment of the components production among the bins. That is the integer variables array produce in the sample. Beside the model and the objective terms are linear and the model is solved by the Cplex engine.

    For a CP model you can use whatever arithmetical operators (sum, min, max) or function (square, square root, log, /) and some arithmetical constraints such as x <= 5, y != 1, .... In the latest case the constraint is cast in a Boolean expression whose value is 1 is the constraint is enforced in the solution (e.g. if x is assigned to 4 the value of x < 5 is 1), zero elsewhere.

    I may not have understood your need, please tell me more.

     

    Hope that helps

    Thank you CRG.

    I realized that the objective function must be consist of the expression of the variables of the model. 

    I am going to study hard on my problem. If I am faced with a problem, I will write into the forum again in detail. 

     

    Regards.