Optimization Services


 

 

 

 

 

 

 

 

Optimization Services query Language (OSqL)

Click to see or download the OSqL XML Schema -> OSqL.xsd [prototype under development]


OSqL (query) is a specification of the query language format used to discover the optimization services in the OS registry. The OS registry returns the locations of the solvers that match the OSqL query in OSuL.

In an OS registry implementation, an OSqL query can be converted to an XQuery that is executed against the XML database the OSRegistry keeps. The OSRegistry database is open and published on the OS registry’s Web site for public references. Since the OSRegistry database file is in XML, the client can directly use the XQuery language to retrieve any information. Using XQuery language to query the database is a built-in feature of OSqL. The following is an example using XQuery to discover the URIs of solver services that solve optimization problems with convex nonlinear objective functions:

<?xml version="1.0" encoding="UTF-8"?>
<osql xmlns="os.optimizationservices.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="os.optimizationservices.org http://www.optimizationservices.org/schemas/OSpL.xsd">
       <xQuery>
             for  $a in osel where $a/optimizationType/linearity/objective = 'convexNonlinear' return $a/service/uri
       </xQuery>
</osql>

The second feature OSqL provides is some predefined standard query information.

For example the following example uses the <standard> element to find an "idle" "solver" service that solves optimization problems with "linear" objective and linear constraint functions.

<osql xmlns="os.optimizationservices.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="os.optimizationservices.org http://www.optimizationservices.org/schemas/OSpL.xsd">
       <standard>
             <currentState>idle</currentState>
             <serviceType>solver</serviceType>
             <optimization>
                   <objectiveLinearity>linear</objectiveLinearity>
                   <constraintLinearity>linear</constraintLinearity>
             </optimization>
       </standard>
</osql>

The following figure illustrates the general OSqL Schema.

OSqLSchemaFigure


Links:

Click to see or download the OSqL XML Schema -> OSqL.xsd