[Os-project-managers] Consent agenda items: Sparse objects in OSgL.xsd

Horand Gassmann Horand.Gassmann at Dal.Ca
Thu Oct 7 09:15:09 EDT 2010


Hi guys,

following yesterday's meeting I have gone through the schemas again  
and pulled out the sparse data structures currently in OSgL. There are  
quite a few of them, namely:

DoubleVector:
   Consists of attribute numberOfEl and array of <el> with mult and incr

IntVector:
   Same as DoubleVector, but element value must be integer

NonNegativeIntVector:
   Same but element value must be nonnegative integer

PositiveIntVector:
   Same but element value must be strictly positive

NegativeIntVector:
   Same but element value must be negative

NonNegativeIntVectorWithValueAndDescriptionAttribute:
   Same as NonNegativeIntVector but has two extra attributes, value and
   description. This is used, for instance, in <otherVariableResult>

NegativeIntVectorWithValueAndDescriptionAttribute:
   Analogous to NonNegativeIntVector

LinearConstraintCoefficientsDoubleVector:
   Like DoubleVector, but without numberOfEl

LinearConstraintCoefficientsIntVector:
   Like IntVector, but without numberOfEl

LinearConstraintCoefficientsNonNegativeIntVector:
   Like NonNegativeIntVectorVector, but without numberOfEl. Not used

SparseVector:
   Array (!) of IntVector plus DoubleVector. Never used.

-----------------------------------------------------------------

Consent agenda item 1: remove  
LinearConstraintCoefficientsNonNegativeIntVector. It is not and will  
never be used.

Consent agenda item 2: remove  
NonNegativeIntVectorWithValueAndDescriptionAttribute and  
NegativeIntVectorWithValueAndDescriptionAttribute. It is easy to add  
the attributes in a different way.

Consent agenda item 3: Change SparseVector to:
attribute "numberOfValues"
nonnegative integer array <indices> (with mult and incr but *no*  
separate numberOf...)
double array <values> (with "mult" only, no incr, no separate numberOf...)
A definition and a use case are given in Appendix A and Appendix B,  
respectively.

Consent agenda item 4: Use new SparseVector in <matrices> (other than  
<linearConstraintMatrix>)


You can object to any one of these items, in which case it will be  
discussed at the next meeting.

Cheers

gus

----------------------------------------------

Appendix A

Proposed definition of SparseVector:

<xs:complexType name="SparseVector">
     <xs:annotation>
         <xs:documentation>experimental</xs:documentation>
     </xs:annotation>
     <xs:sequence>
         <xs:element name="indexes">
             <xs:complexType>
                 <xs:choice>
                     <xs:element name="idx" minOccurs="0"  
maxOccurs="unbounded">
                         <xs:annotation>
                             <xs:documentation>number must agree with  
numberOfValues (after "mult" has been considered)</xs:documentation>
                         </xs:annotation>
                         <xs:complexType>
                             <xs:simpleContent>
                                 <xs:extension base="xs:nonNegativeInteger">
                                     <xs:attribute name="mult"  
type="xs:positiveInteger" default="1"/>
                                     <xs:attribute name="incr"  
type="xs:int" default="0"/>
                                 </xs:extension>
                             </xs:simpleContent>
                         </xs:complexType>
                     </xs:element>
                     <xs:element name="base64BinaryData"  
type="Base64BinaryData"/>
                 </xs:choice>
             </xs:complexType>
         </xs:element>
         <xs:element name="values">
             <xs:complexType>
                 <xs:choice>
                     <xs:element name="value" minOccurs="0"  
maxOccurs="unbounded">
                         <xs:annotation>
                             <xs:documentation>number must agree with  
numberOfValues (after "mult" has been considered)</xs:documentation>
                         </xs:annotation>
                         <xs:complexType>
                             <xs:simpleContent>
                                 <xs:extension base="xs:double">
                                     <xs:attribute name="mult"  
type="xs:positiveInteger" use="optional" default="1"/>
                                 </xs:extension>
                             </xs:simpleContent>
                         </xs:complexType>
                     </xs:element>
                     <xs:element name="base64BinaryData"  
type="Base64BinaryData"/>
                 </xs:choice>
             </xs:complexType>
         </xs:element>
     </xs:sequence>
     <xs:attribute name="numberOfValues" use="required"/>
</xs:complexType>

==========================================================================

Appendix B:

Use case:

<objectiveCoefs numberOfValues="5">
     <indexes>
         <idx mult="2">0</idx>
         <idx mult="2" incr="2">3</idx>
         <idx>4</idx>
     </indexes>
     <values>
         <value>-1.0</value>
         <value mult="3">1.0</value>
         <value>-1.0</value>
     </values>
</objectiveCoefs>

This defines the vector [ -1   1   0   1   1  -1]



More information about the Os-project-managers mailing list