[OS] COIN-OS command line arguments

Mike Steglich mike.steglich at berlin.de
Mon Feb 6 12:25:01 EST 2012


You are right, this issue needs to be discussed carefully. I'll submit a ticket... Please see some notes below:
 
Am 06.02.2012 um 17:48 schrieb Horand Gassmann:

> Mike Steglich <mike.steglich at berlin.de> wrote:
> 
>> Hi Gus,
>> 
>> I would like to use double quotes (did I really write brackets ;-)) in this manner to avoid some troubles if a user has blanks in an absolute path. Thinks like OSSolverService -osil /Users/mike/projects/the first one/blablba/file.osil.
> 
> I think this needs to be discussed carefully, as there are multiple pitfalls. First, there is the issue of the directory separator. Should it be / or \? Should the two be used or usable interchangeably?
In CMPL we handle this depending on the operating system. 

> What about single quotes versus double quotes?
We use double quotes.

> What about file names that contain quotes?
I think this should not be permitted. 


> Would the quotes be mandatory?
No


> Etc. In any case, a fairly fundamental change to the parser would be required.
Sorry for the trouble.



> I think the best strategy to get this started would be to file a ticket so that there is a record.
> 
> Cheers
> 
> gus

Thanks 

Mike

> 
>> Am 06.02.2012 um 16:43 schrieb Horand Gassmann:
>> 
>>> Mike Steglich <mike.steglich at berlin.de> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I found an interesting behavior of the OSSolverService command line arguments when I use brackets for embedding file names.
>>>> 
>>>> Please imagine a folder ./test that contains a OSiL file diet.osil.
>>>> 
>>>> The following command works well:
>>>> 
>>>> OSSolverService -osil "test/diet.osil" -osrl "test/diet.osrl" -serviceMethod solve
>>> 
>>> Are you sure about that? The double quotes should not be there. The behavior in both cases should be identical, since the content of the config file is simply concatenated into a string and prepended to the other command line options you type at the terminal.
>>> 
>>>> If I write the 3 command line arguments into a config file diet.cFconf:
>>>> -osil "test/diet.osil"
>>>> -osrl "test/diet.osrl"
>>>> -serviceMethod solve
>>>> 
>>>> and execute OSSolverService via
>>>> OSSolverService -config diet.cFconf
>>>> 
>>>> then I get the following error:
>>>> 
>>>> Optimization Services Solver
>>>> Main Authors: Horand Gassmann, Jun Ma, and Kipp Martin
>>>> Distributed under the Eclipse Public License
>>>> OS Version: 2.4.2
>>>> Build Date: Jan 29 2012
>>>> SVN Version: 4442
>>>> 
>>>> terminate called after throwing an instance of 'ErrorClass'
>>>> Abort trap
>>>> 
>>>> If I do not use brackets for the file names:
>>>> -osil test/diet.osil
>>>> -osrl test/diet.osrl
>>>> -serviceMethod solve
>>>> then the problem does not occur.
>>>> 
>>>> I tested it also with v.2.3.5 and I got the same problem.
>>> 
>>> The error message looks like it could be a bit clearer, but I would definitely consider this behavior expected. The quotes should not be there.
>>> 
>>> Cheers
>>> 
>>> gus
>>> 
>>> 
>>> -------------------------------------------------------
>>> 
>>> Horand I. Gassmann, Professor
>>> 
>>> School of Business Administration, Dalhousie University
>>> 6100 University Avenue, PO Box 15000
>>> Halifax, Nova Scotia, Canada, B3H 4R2
>>> ph. (902) 494-1844
>>> fax (902) 494-1107
>>> 
>>> http://myweb.dal.ca/gassmann/
>>> 
>> 
>> 
> 
> 
> 
> -------------------------------------------------------
> 
> Horand I. Gassmann, Professor
> 
> School of Business Administration, Dalhousie University
> 6100 University Avenue, PO Box 15000
> Halifax, Nova Scotia, Canada, B3H 4R2
> ph. (902) 494-1844
> fax (902) 494-1107
> 
> http://myweb.dal.ca/gassmann/
> 




More information about the OS mailing list