Opened 7 years ago

Closed 5 years ago

#22 closed task (wontfix)

NIP solution get a float

Reported by: blueskythinker Owned by: pbelotti
Priority: minor Milestone:
Component: Couenne Version:
Keywords: Cc:



I'm using couenne to solve a NIP problem, and i get a float solution.

System: Win7+ampl

couenne.exe --version couenne (Microsoft cl 15.00.21022.08 f 80x86), ASL(20100130)

AMPL model file:

param N >0,integer; param Cmax >0,integer; param Cmin >0,integer; set index:=1..N; param alreadlyDownload{index}>=0,integer; param downloadAbility{index}>=0,integer; var x{index}>=0,integer; subject to total:sum{ i in index} x[i]<=Cmax; subject to ability{i in index}: x[i]<=downloadAbility[i]; maximize gain: sum{ i in index} log(x[i]+alreadlyDownload[i]);


param downloadAbility:=

1 28 2 21 3 10; param N:=3; param alreadlyDownload:= 1 479 2 478 3 199; param Cmax:=10; param Cmin:=6;

and AMPL script:

reset; model model.mod; data data.dat; option solver couenne; solve; display x; display gain; display downloadAbility; display alreadlyDownload; display Cmax; display Cmin;

the output:

couenne: Optimal

x [*] := 1 2.79221e-09 2 2.84946e-09 3 10 ;

gain = 17.6836

downloadAbility [*] := 1 28 2 21 3 10 ;

alreadlyDownload [*] := 1 479 2 478 3 199 ;

Cmax = 10

Cmin = 6


Change History (1)

comment:1 Changed 5 years ago by pbelotti

  • Resolution set to wontfix
  • Status changed from new to closed

Apologies for the delay in solving this, but I think this is not a real problem. Although the optimal solution is, strictly speaking, not integer, most solvers (including commercial ones) treat values like 1e-9 as integer. There is an integrality threshold in Cbc that should be used in these cases. Please refer to the Cbc documentation for this.

Note: See TracTickets for help on using tickets.