[eclipse-clp-users] Optimize

From: Ismael München <ismaelmunchen_at_bol.com.br>
Date: Fri, 6 Nov 2009 05:22:37 -0300
Hi,

I have one question...

How do I for maximize the variable Valor in this example?

:- lib(ic).

fabrica(Tarefa) :-
 Custo = []( [](5, 1, 3, 4, 6),
     [](8, 8, 5, 7, 3),
     [](4, 9, 1, 5, 2)),

 Tarefa = [T1, T2, T3],
 Tarefa :: 1..5,

 labeling(Tarefa),

 Valor #= Custo[1, T1] + Custo[2, T2] + Custo[3, T3],
 
 Valor #>= 15,
 
 writeln(Valor).

Ismael
Received on Fri Nov 06 2009 - 07:26:35 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET