Export (0) Print
Expand All
Expand Minimize

OMLX File Format

Solver Foundation 3.0

You can use the OMLX file format to define an extended OML model. The OMLX schema provides information suitable for editing, validating, and solving the model with different data sources.

Every OMLX file must contain a single model. A Model root element contains the entire model. The namespace for OMLX is

<Model xmlns:xsi="http://schemas.microsoft.com/SolverFoundation/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

...

</Model>

Name Element

The Name element contains the name of the model.

<Name>Supply Chain Planning</Name>

ModelText Element

The ModelText element contains the text of the entire OML model.

<ModelText>Model[

Parameters[

Sets, Products, Factories, Areas, Promotions

],

...

]</ModelText>

DataBindings Element

The DataBindings element contains information for binding to different type of data sources. The DataBindings element contains 0 to n BindingSourceInfo elements. Each BindingSourceInfo element contains information for setting up input and output data binding when solving a model.

<DataBindings>

<BindingSourceInfo>

<Name>XML</Name>

...

</BindingSourceInfo>

<BindingSourceInfo>

<Name>SQL</Name>

...

</BindingSourceInfo>

</DataBindings>

BindingSourceInfo Element

In the BindingSourceInfo element, there are two metadata elements:

  1. Name contains the name of the binding source. The name should be unique in DataBindings collection.

  2. Connection contains the connection information for the data source. For SQL Server it is the connection string; for an XML file it is the filename; for SharePointSite it is the Url to the site collections.

There are two elements for individual Parameter/Decision bindings:

  1. ParameterBindings contains input binding information for parameters in the model. The ParameterBindings element can contain 0 to n InputBindingInfo elements, each representing the binding information to a parameter.

  2. DecisionBindings contains output binding information for decisions in the model. The DecisionBindings element can contain 0 to n OutputBindingInfo elements, each representing the binding information to a decision.

<BindingSourceInfo>

<Name>SQL</Name>

<Connection>Data Source=(local);Initial Catalog=SupplyChainPlanning;Integrated Security=SSPI;</Connection>

<ParameterBindings>

<InputBindingInfo>

<Name>manufactureLoads</Name>

<TableName>manufactureLoads</TableName>

<ValueField>ManufactureLoads</ValueField>

<IndexFields>Product</IndexFields>

</InputBindingInfo>

...

</ParameterBindings>

<DecisionBindings>

<OutputBindingInfo>

<Name>Plan</Name>

<TableName>Plan</TableName>

<ValueField>value</ValueField>

<IndexFields>Products,Areas,Promotions,Factories</IndexFields>

</OutputBindingInfo>

...

</DecisionBindings>

</BindingSourceInfo>

InputBindingInfo Element

The InputBindingInfo element contains binding information to a parameter:

  • Name contains the name of the parameter in the model.

  • TableName contains the name of the table data container from the data source.

  • ValueField contains the name of the value field in the table.

  • IndexFields contains the names of index fields separated by commas.

<InputBindingInfo>

<Name>manufactureLoads</Name>

<TableName>manufactureLoads</TableName>

<ValueField>ManufactureLoads</ValueField>

<IndexFields>Product</IndexFields>

</InputBindingInfo>

To define a binding for UniformDistributionParameter, the following elements can be used:

  • Name contains the name of the uniform distribution parameter.

  • TableName contains the name of the table data container from the data source.

  • LowerBoundField contains the field name for the lower bound field.

  • UpperBoundField contains the field name for the upper bound field.

  • IndexFields contains the names of index fields separated by commas.

<InputBindingInfo>

<Name>gasDemand</Name>

<TableName>gasDemand</TableName>

<LowerBoundField>LowerBound</LowerBoundField>

<UpperBoundField>UpperBound</UpperBoundField>

<IndexFields>country</IndexFields>

</InputBindingInfo>

To define a binding for NormalDistributionParameter, the following elements can be used:

  • Name contains the name of the uniform distribution parameter.

  • TableName contains the name of the table data container from the data source.

  • MeanField contains the field name for the mean value.

  • VarianceField field the name for the variance value.

  • IndexFields contains the names of the index fields separated by commas.

<InputBindingInfo>

<Name>gasDemand</Name>

<TableName>gasDemand</TableName>

<MeanField>LowerBound</MeanField>

<VarianceField>UpperBound</VarianceField>

<IndexFields>country</IndexFields>

</InputBindingInfo>

OutputBindingInfo Element

The OutputBindingInfo element contains information for single decision binding:

  • Name contains the name of the decision in the model.

  • TableName contains the name of the table data container which output data will write it to.

  • ValueField contains the name of the value field in table.

  • IndexFields contains the names of index fields separated by commas.

<OutputBindingInfo>

<Name>TotalCost</Name>

<TableName>TotalCost</TableName>

<ValueField>Cost</ValueField>

<IndexFields>Products,Areas</IndexFields>

</OutputBindingInfo>

Directives Element

The Directives element contains all the directives that are used to solve the model. The Directives element contains 0 to n directives. Each directive represents an instance that can be created by SFS. Only one instance per type can exist in a collection of directives.

Here is an example of a Directives element:

<Directives>

<DirectiveInfo>

<TypeName>SimplexDirective</TypeName>

<Enabled>true</Enabled>

<Properties>

<DirectivePropertyInfo>

<Name>Algorithm</Name>

<Value xsi:type="xsd:int">2</Value>

</DirectivePropertyInfo>

<DirectivePropertyInfo>

<Name>Arithmetic</Name>

<Value xsi:type="xsd:int">2</Value>

</DirectivePropertyInfo>

<DirectivePropertyInfo>

<Name>Basis</Name>

<Value xsi:type="xsd:int">1</Value>

</DirectivePropertyInfo>

<DirectivePropertyInfo>

<Name>GetSensitivity</Name>

<Value xsi:type="xsd:boolean">true</Value>

</DirectivePropertyInfo>

<DirectivePropertyInfo>

<Name>IterationLimit</Name>

<Value xsi:type="xsd:int">200</Value>

</DirectivePropertyInfo>

<DirectivePropertyInfo>

<Name>MaximumGoalCount</Name>

<Value xsi:type="xsd:int">20</Value>

</DirectivePropertyInfo>

<DirectivePropertyInfo>

<Name>TimeLimit</Name>

<Value xsi:type="xsd:int">2000</Value>

</DirectivePropertyInfo>

</Properties>

</DirectiveInfo>

</Directives>

DirectiveInfo Element

The DirectiveInfo element contains all the information for a SFS directive object. The DirectiveInfo element contains the following elements:

  • TypeName contains the type name of the SFS directive object.

  • Enabled identifies if the directive is used or not.

  • Properties contains property values for the SFS directive object.

DirectivePropertyInfo Element

The DirectivePropertyInfo element contains a name value pair for each directive object property. The DirectivePropertyInfo element contains the following elements:

  • Name contains the name of the property.

  • Value contains the value of the property.

Show:
© 2014 Microsoft