[SCIP] How to get CSV text format solution in display or saving as CSV text file?

Gerald Gamrath gamrath at zib.de
Tue Apr 30 14:39:04 CEST 2019


Dear Noli,

I am a bit lost what your actual problem is and what exactly you want to 
<set>.

In any case, you should be able to set parameters and write the solution 
with one command.

For example,

bin/scip -c "read check/instances/MIP/bell5.mps set disp freq 1 o write 
solution bell5.sol q"

works for me as well as

bin/scip -b batch.tmp

with batch.tmp looking like this

read check/instances/MIP/bell5.mps set disp freq 1 optimize write 
solution bell5.sol quit

I fear you need to figure out yourself how to call this from within 
gedit in case you do not want to use a shell.

Best
Gerald


Am 30.04.19 um 09:25 schrieb Noli Sicad:
> Hi Stefan,
>
> OK.
>
> The <set> parameters and <write> could not be mixed. It will not work
> together in one file
>
> Thanks.
>
> Noli
>
>
>
> On 4/30/19, Noli Sicad <nsicad at gmail.com> wrote:
>> Hi Stefan,
>>
>> I read the links that you provided several times.
>>
>> It seems that nothing here answer my question and needs.
>>
>> Yes, I got my mysolution.sol file using the interactive solver.
>> However, I like to get done using the batch file set.
>>
>> Thanks.
>>
>> Noli
>>
>>
>> On 4/30/19, Stefan Vigerske <stefan at math.hu-berlin.de> wrote:
>>> https://scip.zib.de/doc-6.0.1/html/SHELL.php#TUTORIAL_FILEIO
>>> And note the -c option of the SCIP executable, example at
>>> https://scip.zib.de/doc-6.0.1/html/index.php#QUICKSTART
>>>
>>> On 4/30/19 2:45 AM, Noli Sicad wrote:
>>>> Hi Gregor,
>>>>
>>>> Thanks for answering my question.
>>>>
>>>> ATM, I am using gedit to clean out the solution using cut, paste and
>>>> replace.
>>>>
>>>> I tried incorporate "write solution mysolution.sol to External Tools in
>>>> gEdit.
>>>>
>>>> I.e.
>>>> ....
>>>> write/solution = mysolution.sol
>>>>
>>>> It seems not to work. How do you do it properly?
>>>>
>>>> I am using R package. The problem is using gsub function to clean. I
>>>> could not get it working.
>>>>
>>>> ~~~~~~
>>>>
>>>> setwd("~/Documents/Work/SCIP")
>>>>
>>>>
>>>> d<-read.delim("mysolution.sol", sep="\t")
>>>>
>>>> d
>>>>
>>>> a<- gsub("obj*.*"," ", d)
>>>>
>>>> a
>>>>
>>>> #write.csv(d, file = "solution.csv")
>>>>
>>>> ~~~~~~~
>>>>
>>>>
>>>> Noli
>>>>
>>>>
>>>> On 4/29/19, Gregor Hendel <hendel at zib.de> wrote:
>>>>> Hi Noli,
>>>>>
>>>>> SCIP does not have a functionality to write solutions in comma
>>>>> separated
>>>>> name-value pairs, and it has never been requested, either, as far as I
>>>>> am aware of.
>>>>>
>>>>> However, the solution that SCIP prints is more or less in csv-format,
>>>>> if
>>>>> you allow white space instead of comma separation. I suggest you store
>>>>> SCIP solutions in .sol format ("write sol mysolution.sol" in
>>>>> interactive
>>>>> shell) and apply little tweaks with a couple of bash commands.
>>>>>
>>>>> I bet you can achieve your desired format using a pipeline of at most 3
>>>>> bash commands. Challenge accepted?
>>>>>
>>>>> Happy bashing,
>>>>> Gregor
>>>>>
>>>>> Am 28.04.19 um 01:50 schrieb Noli Sicad:
>>>>>> Hi,
>>>>>>
>>>>>> How to get comma separated text (CSV) format solution in display (i.e.
>>>>>> screen) using SCIP solver?
>>>>>>
>>>>>> Or Is there a way to save as CSV text file for the SCIP solver
>>>>>> solution?
>>>>>>
>>>>>> Anything e.g. "set write CSV" in interactive SCIP solver?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Noli
>>>>>> _______________________________________________
>>>>>> Scip mailing list
>>>>>> Scip at zib.de
>>>>>> https://listserv.zib.de/mailman/listinfo/scip
>>>>> _______________________________________________
>>>>> Scip mailing list
>>>>> Scip at zib.de
>>>>> https://listserv.zib.de/mailman/listinfo/scip
>>>>>
>>>> _______________________________________________
>>>> Scip mailing list
>>>> Scip at zib.de
>>>> https://listserv.zib.de/mailman/listinfo/scip
>>>>
>>>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list