Open
Description
Dear support team,
I am working on the column generation procedure to solve a scheduling problem. For that, as the sub-problem is a knapsack form, I would like to count all of the extreme points from the pricing and add those entirely to the master problem. I saw the related questions, but I am unsure whether the issue of taking the multiple optimal solutions is being fixed. What I am trying is:
mdl = Model()
# Defining the variables
# Defining the constraints
mdl.setPresolve(SCIP_PARAMSETTING.OFF)
mdl.setHeuristics(SCIP_PARAMSETTING.OFF)
mdl.setSeparating(SCIP_PARAMSETTING.OFF)
mdl.setBoolParam("constraints/countsols/collect", True)
mdl.setLongintParam("constraints/countsols/sollimit", 20)
mdl.writeProblem("Test.lp")
mdl.count()
nsols = mdl.getNCountedSols()
sols = mdl.getSols()
The result is an empty list!!!
By solving the problem with SCIP, I can get the results as following:
# | y_2 | y_1 | x_item2_2 | x_item2_1 | x_item1_2 | x_item1_1
-- | -- | -- | -- | -- | -- | --
1(1) | 0 | 0 | 0 | 0 | 0 | 0
2(2) | 0 | 1 | 0 | 0 | 0 | 0
2(3) | 0 | 1 | 0 | 1 | 0 | 0
3(4) | 0 | 1 | 0 | 0 | 0 | 1
4(5) | 1 | 1 | 0 | 0 | 0 | 1
4(6) | 1 | 1 | 1 | 0 | 0 | 1
5(7) | 1 | 1 | 0 | 0 | 1 | 1
6(8) | 1 | 0 | 0 | 0 | 0 | 0
6(9) | 1 | 0 | 1 | 0 | 0 | 0
7(10) | 1 | 1 | 0 | 0 | 0 | 0
7(11) | 1 | 1 | 0 | 1 | 0 | 0
7(12) | 1 | 1 | 1 | 0 | 0 | 0
7(13) | 1 | 1 | 1 | 1 | 0 | 0
8(14) | 1 | 0 | 0 | 0 | 1 | 0
9(15) | 1 | 1 | 0 | 0 | 1 | 0
9(16) | 1 | 1 | 0 | 1 | 1 | 0
However, I am trying to use the method mdl.writeSol()
, but I am not aware of how to define the required argument solution
to test and see what's really happened. I was wondering if, you could take a look and hint to me about that.
Installing collected packages: pyscipopt
Successfully installed pyscipopt-5.1.1
Install by PIP
All the best
Abbas