Sorry, I sent the message below with wrong mail account.
Begin forwarded message:
Date: 25 November 2010 4:48:17 PM
To: [email protected]
Subject: Cost for values in domainHi, allFirst, sorry about the bad English.I'm searching in MPG.pdf, but still didn't find anything.Is it possible to give cost to values in domain? I have n variables, each one with integer domain = {-1, 0, 1}. But I want to give costs for each value in each domain, and minimize the cost of the selection, obeying some other constrints.For example: for variables z, y, z, the costs for values {-1, 0, 1} are:Cx = {50, 20, 30}Cy = {30, 40, 30}Cz = {60, 20, 20}And I want to select x, y, z minimizing Cx + Cy + Cz.I first tought in create a bool variable for each cost in each variable. So I would get 3X more variables, with contraint that only one shoul be true. And do something like this: maximizeb_1x*c_1x + b_2x*c_2x + b_3x*c_3x +b_1y*c_1y + b_2y*c_2y + b_3y*c_3y +b_1z*c_1z + b_2z*c_2z + b_3z*c_3zIs there a better way to do this?Thank you
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
