Originally posted by: SystemAdmin
Dear Shahin,
I am not sure to understand the model you want to solve: you have variables X, a set of constraints C(X), and an objective function f(X). You can model C(X) but you cannot easily model f(X). However, you can compute a value for f(X) once all variabled of X are fixed. Is that correct ?
In this case you need to define your own constraint c(y, X) that is equivalent to y = F(X). A basic implementation would be to wait until all variables X are fixed to fix y to the objective value. A smarter way to go would be to infer a range for y even when a part of the variables X are fixed, and - converely - to be able to reduce the set of possible values for variables in X when having a range on y.
There are several examples in the Solver manual that shows how to define specialized constraint. I particular, you can look at the chapter "Defining New Constraints" in the user manual.
Regards,
Philippe
#CPOptimizer#DecisionOptimization