SetSolverSpecificOptions for SCIP in C#

313 views
Skip to first unread message

di...@rome2rio.com

unread,
Nov 29, 2017, 8:24:31 PM11/29/17
to or-tools-discuss
Hi,

I am trying to use the SetSolverSpecificOptions function in C#, but no matter what I write (except the empty string) I always get false as the return value of the function.
I tried:
solver.SetSolverSpecificParametersAsString("#comment")
solver.SetSolverSpecificParametersAsString("limits/time = 100"); //I know there is a function for this, but just testing
solver.SetSolverSpecificParametersAsString("limits/solutions = 4"); 

I am using the syntax expressed here in the SCIPs website: http://scip.zib.de/doc/html/PARAMETERS.php


Am I using the wrong syntax? 


Thanks!

di...@rome2rio.com

unread,
Nov 30, 2017, 3:08:20 AM11/30/17
to or-tools-discuss
FYI:
I did a tiny modification to or-tools (v6.5) by adding the  a ReadParameterFile(filename) tot he MPSolver that calls the homonym function in the MPSolverInterface, then exposed that MPSolver::ReadParameterFile to the C# interface and I was able to read a file containing the configuration correctly (returned SCIP_OKAY, thus true all the way into the C# interface). 
I suspect maybe the issue with  SetSolverSpecificParametersAsString is creating the file? (maybe /tmp/filename is not allowed on windows? I tried to run as admin, but didn't work either).

I think the fix is ok... The string you would pass to  SetSolverSpecificParametersAsString  is solver specific, so calling  the ReadPArameterFile is maybe more flexible even? (the user could have multiple files stored for each solver).

In your comments I saw that you say that SCIP and Gurobi need to read the config file before every run... Is this actually still true? I find nothing in the SCIP documentation that says it.

Diego

di...@rome2rio.com

unread,
Nov 30, 2017, 10:27:22 PM11/30/17
to or-tools-discuss
Actually, by the looks of it, SCIP couldn't care less about what one writes in that config file... I set limits/time = 10 and ran for well over 10 seconds... It still returned SCIP_OKAY though. Any idea?
Reply all
Reply to author
Forward
0 new messages