[SCIP] Problem with integer variables getting not integer solution
Luciana Garcia Richter
lugrichter at gmail.com
Fri Jul 29 00:53:09 CEST 2016
Hi,
I have defined a problem with integer variables (it is an instance of
a knapsack problem).
I have included the print for the original problem, the transformed
problem and the solution.
As you can see, all variables are defined as integer, but the solution
I get is far away from an integer value (e.g. 2.6 for x1 or 0.4 for
x3)
Is there something I'm missing?
######################### SCIPprintOrigProblem ############################
STATISTICS
Problem name : Knapsack
Variables : 6 (0 binary, 6 integer, 0 implicit integer, 0 continuous)
Constraints : 1 initial, 1 maximal
OBJECTIVE
Sense : maximize
VARIABLES
[integer] <x0>: obj=575.555555555556, original bounds=[0,10000000000]
[integer] <x1>: obj=1280.55555555556, original bounds=[0,10000000000]
[integer] <x2>: obj=1295, original bounds=[0,10000000000]
[integer] <x3>: obj=1295, original bounds=[0,10000000000]
[integer] <x4>: obj=1295, original bounds=[0,10000000000]
[integer] <x5>: obj=1295, original bounds=[0,10000000000]
CONSTRAINTS
[linear] <R>: -10000000000 <= +520<x0>[I] +1000<x1>[I] +1066<x2>[I]
+1120<x3>[I] +1150<x4>[I] +1250<x5>[I] <= 5180;
END
######################### SCIPprintTransProblem ############################
STATISTICS
Problem name : t_Knapsack
Variables : 6 (0 binary, 6 integer, 0 implicit integer, 0 continuous)
Constraints : 1 initial, 1 maximal
OBJECTIVE
Sense : minimize
Scale : 0.555555555555556
VARIABLES
[integer] <t_x0>: obj=-1036, global bounds=[1,2], local bounds=[1,2]
[integer] <t_x1>: obj=-2305, global bounds=[3,3], local bounds=[3,3]
[integer] <t_x2>: obj=-2331, global bounds=[2,2], local bounds=[2,2]
[integer] <t_x3>: obj=-2331, global bounds=[-0,0], local bounds=[-0,0]
[integer] <t_x4>: obj=-2331, global bounds=[-0,0], local bounds=[-0,0]
[integer] <t_x5>: obj=-2331, global bounds=[-0,0], local bounds=[-0,0]
CONSTRAINTS
[linear] <R>: +625<t_x5>[I] +500<t_x1>[I] +533<t_x2>[I]
+560<t_x3>[I] +575<t_x4>[I] +260<t_x0>[I] <= 2590;
END
######################### SCIPprintSol ############################
objective value: -infinity
x0 -1.00125783520231e-015
(obj:575.555555555556)
x1 2.6 (obj:1280.55555555556)
x2 2 (obj:1295)
x3 0.400000000000001 (obj:1295)
x4 -0 (obj:1295)
x5 0 (obj:1295)
Thanks in advance,
Luciana
More information about the Scip
mailing list