You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(4) |
Dec
(7) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(2) |
Feb
(8) |
Mar
(13) |
Apr
(1) |
May
(2) |
Jun
(5) |
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
(9) |
Nov
(1) |
Dec
(15) |
| 2006 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
(10) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
| 2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(14) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(13) |
Nov
(4) |
Dec
(7) |
| 2008 |
Jan
(1) |
Feb
(4) |
Mar
(2) |
Apr
(7) |
May
(4) |
Jun
(17) |
Jul
(20) |
Aug
(7) |
Sep
(23) |
Oct
(18) |
Nov
(47) |
Dec
(51) |
| 2009 |
Jan
(35) |
Feb
(20) |
Mar
(32) |
Apr
(38) |
May
(119) |
Jun
(99) |
Jul
(65) |
Aug
(22) |
Sep
(24) |
Oct
(39) |
Nov
(9) |
Dec
(10) |
| 2010 |
Jan
(8) |
Feb
(8) |
Mar
(76) |
Apr
(72) |
May
(80) |
Jun
(83) |
Jul
(28) |
Aug
(57) |
Sep
(25) |
Oct
(3) |
Nov
|
Dec
(1) |
| 2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
(1) |
16
|
17
(1) |
18
|
|
19
|
20
|
21
|
22
|
23
(1) |
24
|
25
|
|
26
|
27
|
28
|
29
(1) |
30
(1) |
|
|
|
From: <ig...@so...> - 2005-06-30 15:26:10
|
this is the stack of the launched exception
Exception in thread "main" java.lang.UnsupportedOperationException
at choco.AbstractConstraint.opposite(Unknown Source)
at
choco.bool.AbstractLargeBoolConstraintWithCounterOpposite.<init>(Unknown
Source)
at choco.bool.LargeDisjunction.<init>(Unknown Source)
at choco.Problem.makeDisjunction(Unknown Source)
at choco.Problem.or(Unknown Source)
at ProvaVincoli.postConstraints(ProvaVincoli.java:40)
at ProvaVincoli.<init>(ProvaVincoli.java:13)
at ProvaVincoli.main(ProvaVincoli.java:45)
This is the piece of code:
//-------------------------------------------------------
import java.io.*;
import java.util.*;
import choco.*;
import choco.integer.*;
public class ProvaVincoli {
Problem p = null;
public ProvaVincoli()
{ p = new Problem();
postConstraints();
}
private void postConstraints()
{int dim = 5;
Constraint [] c = new Constraint[dim];
IntVar [] v = new IntVar[dim];
int prezzoMax = 100;
c = new Constraint[dim];
IntVar varPrezzoMax = p.makeEnumIntVar("price",prezzoMax,prezzoMax);
int prezzoVoloFinale = 98;
for(int i=0; i< dim; i++)
{
v[i] = p.makeBoundIntVar("V"+i,0,dim-1);
c[i] = p.ifOnlyIf( p.leq(prezzoVoloFinale , varPrezzoMax) ,
p.eq(v[i], i) );
prezzoVoloFinale++;
}
//--now comes the line that launches the exception
p.post(p.or(c));
}
public static void main(String []s)
{new ProvaVincoli();
}
}
//-------------------------------------------------------
someone has any clue?
thanks
|
|
From: C. <co...@li...> - 2005-06-29 10:57:51
|
Le jeudi 23 juin 2005 =E0 08:35 -0600, ig...@so... a =E9crit :
> The scenario of our little application is this:
>=20
> int k =3D 4;
> int q =3D 2;
> Problem p =3D new Problem();
> IntVar a =3D p.makeBoundIntVar("foo",1,3);
> IntVar b =3D p.makeBoundIntVar("foo2",1,3);
> Constraint p.leq(a, k);=20
>=20
> We want to create another constraint, saying that if the value of IntVa=
r "b"=20
> is (let's say) 5 (and only in this case), then the constraint "one" mus=
t be=20
> modified to something like this: p.leq(a, k*(q+1))
> The new constraint is weaker than the older one, so they can't cohexist=
.=20
>=20
> We don't want to check explicitly the values, we want to demand all the=
=20
> dirty work to choco :)
> Is that possible?=20
Hello,
Someone probably already answer you... Anyway bellow is a solution:
Since what you call the "new constraint" will always be verified (it is
weaker that constraint "one") you can post it from the begining...
To capture the fact that "5" is a special value you then post the
constraint pb.implies(pb.neq(b,5),pb.leq(a,k)) !
Hope it helps,
--
Remi
|
|
From: <ig...@so...> - 2005-06-23 14:35:55
|
The scenario of our little application is this:
int k = 4;
int q = 2;
Problem p = new Problem();
IntVar a = p.makeBoundIntVar("foo",1,3);
IntVar b = p.makeBoundIntVar("foo2",1,3);
Constraint k);
We want to create another constraint, saying that if the value of IntVar "b"
is (let's say) 5 (and only in this case), then the constraint "one" must be
modified to something like this: p.leq(a, k*(q+1))
The new constraint is weaker than the older one, so they can't cohexist.
We don't want to check explicitly the values, we want to demand all the
dirty work to choco :)
Is that possible?
thanks!
|
|
From: Hadrien C. <had...@em...> - 2005-06-17 13:02:30
|
Hi,
You can see here an example of code where we ask for all solution one by one
(values are directly accessible in
variables, no need of s.getSearchSolver().solutions.get(0) anymore) for
a problem only stating that 2*x + 3*y <= 10 as you requested :
(It uses the method scalar that takes coefficients and variables in argument
to express a scalar product
and leq means "less than equal")
public static void main(String[] args) {
Problem pb = new Problem();
IntVar x = pb.makeEnumIntVar("x",0,10);
IntVar y = pb.makeEnumIntVar("y",0,10);
pb.post(pb.leq(pb.scalar(new int[]{2,3},new IntVar[]{x,y}),10));
pb.solve();
if (pb.isFeasible() == Boolean.TRUE) {
do {
System.out.println("x : " + x.getVal() + " y : " + y.getVal());
} while(pb.nextSolution() == Boolean.TRUE);
}
}
Hope ot helps
Hadrien
----- Original Message -----
From: "Matthieu Pichaud" <ma...@gm...>
To: <cho...@li...>
Sent: Wednesday, June 15, 2005 6:02 PM
Subject: [Choco-users] Modeling and retrieving all solutions
> Hi,
>
> I have two questions:
>
> - I would like to retrieve all the solutions of my problem. But, as I read
> and experienced, the number of solutions one can retrieve is limited to
> 5. You proposed to use a while loop on the condition pb.nextSolution()
> to get all the results. I don't really see how to implement that. When
doing
> so, the functions s.getSearchSolver().solutions.get(0) becomes irrelevant
> and I have no clue where to find the next result.
>
> - I try to retrieve all interger solutions from a Integer Programming
> problem.
> I don't know how to multiply an integer variable by an integer value in
> order to add a constraint of this kind: 2*x + 3*y <= 10
>
> Thanks a lot for your help!
>
> Matth
>
> --
> Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
> ++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Choco-users mailing list
> Cho...@li...
> https://lists.sourceforge.net/lists/listinfo/choco-users
>
|
|
From: Matthieu P. <ma...@gm...> - 2005-06-15 16:02:12
|
Hi, I have two questions: - I would like to retrieve all the solutions of my problem. But, as I read and experienced, the number of solutions one can retrieve is limited to 5. You proposed to use a while loop on the condition pb.nextSolution() to get all the results. I don't really see how to implement that. When doing so, the functions s.getSearchSolver().solutions.get(0) becomes irrelevant and I have no clue where to find the next result. - I try to retrieve all interger solutions from a Integer Programming problem. I don't know how to multiply an integer variable by an integer value in order to add a constraint of this kind: 2*x + 3*y <= 10 Thanks a lot for your help! Matth -- Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis ++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++ |