hi, To use constraint programming, you need to express your function f_checker using constraints. Since you don't specify what f_checker does, I don't know if that is easy or hard to do.
If N is reasonably small or if f_checker has a small number of true cases, you can use extensional constraints to encode the function directly. Cheers, Mikael 2010/4/8 Claudio Cesar de Sá <[email protected]> > Dear coleauges > > > The problem is easy in its formulation... however, it has been > difficult for me. > > The output desired is a matrix NxN, filled with 0 and 1. > This matrix must be accepted by a checker function, > i.e., it is a constraint such: > > > f_checker( MATRIX , parameter_fix ) == TRUE > so, if this f_checker return TRUE, this solution admissible. > > > Questions: > > Is possible to use something like > > IntVarArray my_matrix; // > > ................... > public: > /// Actual model > My_problem(const SizeOptions& opt) : > my_matrix(*this, size*size, 0, 1) > { > Matrix<IntVarArray> MATRIX( my_matrix , size, size); > > //How to post the constraint from a function, like: > f_checker( MATRIX , parameter_fix ) == TRUE > is it works? > > // Install branching > branch(*this, my_matrix , INT_VAR_NONE, INT_VAL_MAX); > > } > > > Is exist any alternative for directly to use matrix in Gecode? > Alternatives to work with matrix and constraints? > > > > > claudio > > > > ( > )) > |""|-. > |__|-' > > > ********************************************************************** > Skype: claudio_cesar_sa > Links: > http://laic.u-clermont1.fr/ > http://www.colmeia.udesc.br/ > http://www2.joinville.udesc.br/~coca/ > http://www2.joinville.udesc.br/~esp7maratona/ > Blog: http://claudiocesar.wordpress.com/ > *********************************************************************** > > _______________________________________________ > Gecode users mailing list > [email protected] > https://www.gecode.org/mailman/listinfo/gecode-users > > -- Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
