[OS] Java: how to start?

Olivier Cailloux olivier.cailloux at ecp.fr
Thu Jan 28 11:21:13 EST 2010


Horand Gassmann a écrit :
> Quoting Olivier Cailloux <olivier.cailloux at ecp.fr>:
>
>> Oops, missing the xml file, sorry.
>>
>> Thank you for your fast answer.
>>
>> Kipp Martin a écrit :
>>> Hi Olivier:
>>>
>>> First, thank you very much for your interest in OS.
>>>
>
>> I made several more tries but am still unable to find what is my
>> mistake. I am trying to input the following model.
>> /* Decision variables */
>> var gjb2 >=0;
>> var gjb3 >=0;
>> var s2 >= 0;
>> var s3 >= 0;
>> /* Objective function */
>> minimize sumofslack: s2 + s3;
>> /* Constraints */
>> s.t. lowcat : gjb2 + s2 = 3;
>> s.t. highcat : gjb3 - s3 - 0.1 = 3;
>> end;
>>
>> Attached is the xml osil file I obtained with one of my tries. I don't
>> see why it is incorrect. (It uses column layout instead of row but I
>> also tried with row layout with no success.)
>
> I am not sure what you mean when you say "it is incorrect". The file 
> is valid
> under the OSiL schema and, from what I can tell, transcribes the given 
> problem.
> What sort of errors do you experience? Does the parser report an 
> error? Is the
> solution nonsensical?
Indeed I should have included this. Running OSSolverService with this 
input file produces the following error (while running it with the 
parincLinear example file produces no error).

~$ ...OSSolverService -osil osil1.xml
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" 
href="../stylesheets/OSrL.xslt"?>
<osrl xmlns="os.optimizationservices.org"   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="os.optimizationservices.org 
http://www.optimizationservices.org/schemas/2.0/OSrL.xsd" >
<general>
<generalStatus type="error"/>
<message>PARSER ERROR:  Input is either not valid or well formed: 
improperly formed <instanceData> element
Here are 20 characters currently being pointed to in the input string: 
?xml version="1.0" e
See line number: 7
</message>
</general>
<job>
</job>
</osrl>

Olivier



More information about the OS mailing list