Assuming your variables are integer, you can use Logic programming with Prolog
www.gprolog.org

Yo.

----- Message d'origine ----
De : Michael Hennebry <[EMAIL PROTECTED]>
À : Salim Fadhley <[EMAIL PROTECTED]>
Cc : [email protected]
Envoyé le : Vendredi, 23 Février 2007, 18h46mn 44s
Objet : Re: [Help-glpk] Counting solutions rather than optimizing solutions

On Thu, 22 Feb 2007, Salim Fadhley wrote:

> For an experimental project my objective is to count the number of solutions
> andnot optimize for a particular constraint. The puzzle is a pretty basic one 
> for
> now:
>
> var a1 >=0;  /* 200 */
> var b1 >=0;  /* 100 */
> var c1 >=0;  /* 50 */
> var d1 >=0;  /* 20 */
> var e1 >=0;  /* 10 */
> var f1 >=0;  /* 5 */
> var g1 >=0;  /* 2 */
> var h1 >=0;  /* 1 */
>
> s.t. Make: a1 * 200 + b1*100 + c1 * 50 + d1 * 20 + e1 * 10 + f1 * 5 + g1 * 2 +
> h1 <= 1000
>
> As far as this puzzle is concerned no valid solution of the above is more
> valid than any other, I just need a way to enumerate how many of them exist. 
> Is
> there an objective function that will just give me the count of solutions?

No.

Try dynamic programming or something.
A really patient person (not I) could do it by hand.

-- 
Mike   [EMAIL PROTECTED]
"Finally, mount the partition, not the virgin."  --  Charles Curley



_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk





        

        
                
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com


_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to