<?xml version="1.0" encoding="UTF-8"?>
<!-- Siconos is a program dedicated to modeling, simulation and control
 of non smooth dynamical systems.

 Copyright 2020 INRIA.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License. -->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cArg="X-Constructor_Arguments">


<!--~~~~~~~~~~~~~ Definitions of used types ~~~~~~~~~~~~~-->
<xsd:simpleType name="positiveDouble">
	<xsd:restriction base="xsd:double">
		<xsd:minInclusive value="0"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="boolean">
	<xsd:restriction base="xsd:boolean">
<!--		<xsd:enumeration value="true"/>
		<xsd:enumeration value="false"/>
-->	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="PossibleDSValues">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="LagrangianDS"/>
		<xsd:enumeration value="LagrangianLinearTIDS"/>
		<xsd:enumeration value="FirstOrderLinearDS"/>
		<xsd:enumeration value="FirstOrderLinearTIDS"/>
		<xsd:enumeration value="FirstOrderNonLinearDS"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="PossibleRelationValues">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="FirstOrderR"/>
		<xsd:enumeration value="LagrangianR"/>
	</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="PossibleSimulationValues">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="TimeStepping"/>
		<xsd:enumeration value="EventDriven"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="PossibleNSLawValues">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="RelayNSL"/>
		<xsd:enumeration value="ComplementarityConditionNSL"/>
		<xsd:enumeration value="NewtonImpactNSL"/>
		<xsd:enumeration value="NewtonImpactFrictionNSL"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="PossibleOneStepIntegratorValues">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="MoreauJeanOSI"/>
		<xsd:enumeration value="LsodarOSI"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="BoundaryConditionValues">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="Linear"/>
		<xsd:enumeration value="NLinear"/>
		<xsd:enumeration value="Periodic"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="NormTypeValues">
	<xsd:restriction base="xsd:string">
		<xsd:enumeration value="max"/>
		<xsd:enumeration value="..."/>
	</xsd:restriction>
</xsd:simpleType>


<xsd:simpleType name="doubleList">
	<xsd:list itemType="xsd:double"/>
</xsd:simpleType>

<xsd:simpleType name="intList">
	<xsd:list itemType="xsd:nonNegativeInteger"/>
</xsd:simpleType>

<xsd:simpleType name="pluginType">
	<xsd:restriction base="xsd:string">
		<xsd:pattern value="[a-zA-Z0-9/.]+:[a-zA-Z0-9]+"/>
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="strList">
	<xsd:list itemType="xsd:string"/>
</xsd:simpleType>

<xsd:complexType name="pluginDef">
	<xsd:simpleContent>
		<xsd:extension base="doubleList">
			<!--calculated with a plugin function -->
			<xsd:attribute name="plugin" type="pluginType"/>
		</xsd:extension>
	</xsd:simpleContent>
</xsd:complexType>

<xsd:complexType name="emptyType">
  <xsd:attribute name="all" type="xsd:double"/>
</xsd:complexType>


<xsd:complexType name="vector">
	<xsd:simpleContent>
		<xsd:extension base="doubleList">
			<xsd:attribute name="all" type="xsd:boolean" use="optional" default ="false"/>
			<!--Vector is defined in the tag -->
			<xsd:attribute name="vectorSize" type="xsd:nonNegativeInteger" use="optional" default ="1"/>
			<!--Vector is defined in a file -->
			<xsd:attribute name="vectorFile" type="xsd:string" use="optional"/>
			<!--Vector is calculated with a plugin function -->
			<xsd:attribute name="vectorPlugin" type="pluginType" use="optional"/>
		</xsd:extension>
	</xsd:simpleContent>
</xsd:complexType>

<!--   -->
<xsd:complexType name="matrix">
	<xsd:sequence>
		<xsd:element name="row" minOccurs="0" maxOccurs="unbounded" type="doubleList"/>
	</xsd:sequence>
	<!--Matrix is defined in the tag -->
	<xsd:attribute name="matrixColSize" type="xsd:nonNegativeInteger" use="optional"/>
	<xsd:attribute name="matrixRowSize" type="xsd:nonNegativeInteger" use="optional"/>
	<!--Matrix is defined in a file -->
	<xsd:attribute name="matrixFile" type="xsd:string" use="optional"/>
	<!--Matrix is calculated with a plugin function -->
	<xsd:attribute name="matrixPlugin" type="pluginType" use="optional"/>
</xsd:complexType>

<xsd:complexType name="listOfMatrices">
	<xsd:sequence>
		<xsd:element name="matrix" minOccurs="0" maxOccurs="unbounded" type="matrix"/>
	</xsd:sequence>
	<!--Matrix is defined in the tag -->
	<xsd:attribute name="number" type="xsd:nonNegativeInteger" use="optional"/>
</xsd:complexType>

<xsd:complexType name="matrixData">
	<xsd:sequence>
		<xsd:element name="row" minOccurs="0" maxOccurs="unbounded" type="doubleList"/>
	</xsd:sequence>
	<!--Matrix is defined in the tag -->
	<xsd:attribute name="matrixColSize" type="xsd:nonNegativeInteger" use="optional"/>
	<xsd:attribute name="matrixRowSize" type="xsd:nonNegativeInteger" use="optional"/>
</xsd:complexType>

<xsd:complexType name="matrixPlugin">
	<!--Matrix is calculated with a plugin function -->
	<xsd:attribute name="matrixPlugin" type="pluginType" use="optional"/>
</xsd:complexType>

<xsd:complexType name="matrixFile">
	<!--Matrix is defined in a file -->
	<xsd:attribute name="matrixFile" type="xsd:string" use="optional"/>
</xsd:complexType>

<xsd:complexType name="OSI">
	<xsd:sequence>
		<xsd:element name="DS_Concerned" type="strList" minOccurs='1' maxOccurs='1'/>
		<xsd:element name="Interactions_Concerned" type="strList" minOccurs='0' maxOccurs='1'/>
	</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="NSL">
	<xsd:attribute name="size" type="xsd:positiveInteger" use='required'/>
</xsd:complexType>


<xsd:complexType name="OSNSP">
	<xsd:sequence>
		<!--		<xsd:element name="Interactions_Concerned" type="index_list" minOccurs='1' maxOccurs='1'/> -->
		<xsd:element ref="NonSmoothSolver" minOccurs='0' maxOccurs='1'/>
	</xsd:sequence>
	<xsd:attribute name="StorageType" type="xsd:nonNegativeInteger" use="optional"/>
	<xsd:attribute name="Id" type="xsd:string" use="optional"/>
</xsd:complexType>


<!-- Time of the Model -->
<xsd:complexType name="ModelTime">
	<xsd:all>
	<xsd:element name="t0" type="positiveDouble" minOccurs='1' maxOccurs='1'/>
	<xsd:element name="T" type="positiveDouble" minOccurs='1' maxOccurs='1'/>
</xsd:all>
</xsd:complexType>

<!-- Boundary Condition -->
<xsd:complexType name="BoundaryCondition">
	<xsd:choice minOccurs='1' maxOccurs='1'>
		<xsd:element name="Linear">
			<xsd:complexType>
				<xsd:all>
					<xsd:element name="Omega" type="vector" minOccurs='1' maxOccurs='1'/>
					<xsd:element name="Omega0" type="matrix" minOccurs='1' maxOccurs='1'/>
					<xsd:element name="OmegaT" type="matrix" minOccurs='1' maxOccurs='1'/>
				</xsd:all>
			</xsd:complexType>
		</xsd:element>
		<xsd:element name="NLinear">
			<xsd:complexType>
				<xsd:all>
					<xsd:element name="empty1" type="positiveDouble" minOccurs="0" maxOccurs="1"/>
				</xsd:all>
			</xsd:complexType>
		</xsd:element>
		<xsd:element name="Periodic">
			<xsd:complexType>
				<xsd:all>
					<xsd:element name="empty2" type="positiveDouble" minOccurs="0" maxOccurs="1"/>
				</xsd:all>
			</xsd:complexType>
		</xsd:element>
	</xsd:choice>
<!--	<xsd:attribute name="type" type="BoundaryConditionValues" use="required"/> -->
</xsd:complexType>


<!-- Non smooth problem solver definition tag: -->
<xsd:element name="NonSmoothSolver">
	<xsd:complexType>
		<xsd:all>
			<xsd:element name="iparam" type="vector" minOccurs='0' maxOccurs='1'/>
			<xsd:element name="dparam" type="vector" minOccurs='0' maxOccurs='1'/>
		</xsd:all>
		<xsd:attribute name="Name" type="xsd:string" use="required"/>
	</xsd:complexType>
</xsd:element>

<!--~~~~~~ special type to provide a list of indexes for DS (for interaction, OSI ...), interaction (for OneStepNS, ...) or anything else ~~~~~~~~-->
<xsd:complexType name="index_list">
	<xsd:sequence>
		<xsd:element name="indexList" minOccurs="0" maxOccurs="unbounded" type="vector"/>
	</xsd:sequence>
	<xsd:attribute name="all" type="boolean" use="optional" default="false"/>
</xsd:complexType>

<!--~~~~~~~~~~~~~~~~~~~~~~~~ Model ~~~~~~~~~~~~~~~~~~~~~~~~~-->
<xsd:element name="SiconosModel">
	<xsd:complexType>
		<xsd:sequence>
			<xsd:element name="Title" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="Author" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="Date" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			<xsd:element name="SchemaXML" type="xsd:string" minOccurs="0" maxOccurs="1"/>

<!--~~~~~~~~~~~~~~~~~~~~~~~ Time ~~~~~~~~~~~~~~~~~~~~~~~~-->
			<xsd:element name="Time" type="ModelTime" minOccurs='1' maxOccurs='1'/>

			<!--~~~~~~~~~~~~~~~~~~~~~~ NSDS ~~~~~~~~~~~~~~~~~~~~~~~~~~-->
			<xsd:element name="NSDS" minOccurs='1' maxOccurs='1'>
				<xsd:complexType>
					<xsd:sequence>

						<!--~~~~~~~~~~~~~ DS_Definition ~~~~~~~~~~~~~-->
						<xsd:choice minOccurs='1' maxOccurs='1'>
							<xsd:element name="DS_LMGC90">
								<xsd:complexType>
									<xsd:sequence>
										<xsd:element name="empty" type="xsd:string" minOccurs='0' maxOccurs='1'/>
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>

							<xsd:element name="DS_Definition">
								<xsd:complexType>
									<!--~~~~~~~~~~~~~~~~~ DS ~~~~~~~~~~~~~~~~~-->
									<xsd:sequence>
										<xsd:choice minOccurs='0' maxOccurs='unbounded'>
										<xsd:element name="FirstOrderNonLinearDS">
											<xsd:complexType>
												<xsd:all>
													<xsd:element name="x0" type="vector" minOccurs='1' maxOccurs='1' cArg:order='1'/>
													<xsd:element name="M" type="matrix" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="f" type="vector" minOccurs='1' maxOccurs='1'/>
													<xsd:element name="Jacobianfx" type="matrix" minOccurs='0' maxOccurs='1'/>
												</xsd:all>
												<xsd:attribute name="Name" type="xsd:string" use='required'/>
											</xsd:complexType>
										</xsd:element>

										<xsd:element name="FirstOrderLinearDS">
											<xsd:complexType>
												<xsd:all>
													<xsd:element name="x0" type="vector" minOccurs='1' maxOccurs='1' cArg:order='1'/>
													<xsd:element name="A" type="matrix" minOccurs='1' maxOccurs='1' cArg:order='2'/>
													<xsd:element name="b" type="vector" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="M" type="matrix" minOccurs='0' maxOccurs='1'/>
												</xsd:all>
												<xsd:attribute name="Name" type="xsd:string" use='required'/>
											</xsd:complexType>
										</xsd:element>

										<xsd:element name="FirstOrderLinearTIDS">
											<xsd:complexType>
												<xsd:all>
													<xsd:element name="x0" type="vector" minOccurs='1' maxOccurs='1' cArg:order='1'/>
													<xsd:element name="A" type="matrix" minOccurs='1' maxOccurs='1' cArg:order='2'/>
													<xsd:element name="M" type="matrix" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="b" type="vector" minOccurs='0' maxOccurs='1'/>
												</xsd:all>
												<xsd:attribute name="Name" type="xsd:string" use='required'/>
											</xsd:complexType>
										</xsd:element>

										<xsd:element name="LagrangianDS">
											<xsd:complexType>
												<xsd:all>
													<xsd:element name="q0" type="vector" minOccurs='1' maxOccurs='1' cArg:order='1'/>
													<xsd:element name="Velocity0" type="vector" minOccurs='1' maxOccurs='1' cArg:order='2'/>
													<xsd:element name="Mass" type="matrix" minOccurs='1' maxOccurs='1'/>
													<xsd:element name="FInt" type="vector" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="FExt" type="vector" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="FGyr" type="vector" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="JacobianQFInt" type="matrix" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="JacobianVelocityFInt" type="matrix" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="JacobianQFGyr" type="matrix" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="JacobianVelocityFGyr" type="matrix" minOccurs='0' maxOccurs='1'/>
												</xsd:all>
												<xsd:attribute name="Name" type="xsd:string" use='required'/>
											</xsd:complexType>
										</xsd:element>

										<xsd:element name="LagrangianLinearTIDS">
											<xsd:complexType>
												<xsd:all>
													<xsd:element name="q0" type="vector" minOccurs='1' maxOccurs='1' cArg:order='1'/>
													<xsd:element name="Velocity0" type="vector" minOccurs='1' maxOccurs='1' cArg:order='2'/>
													<xsd:element name="Mass" type="matrix" minOccurs='1' maxOccurs='1' cArg:order='3'/>
													<xsd:element name="FExt" type="vector" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="K" type="matrix" minOccurs='0' maxOccurs='1'/>
													<xsd:element name="C" type="matrix" minOccurs='0' maxOccurs='1'/>
												</xsd:all>
												<xsd:attribute name="Name" type="xsd:string" use='required'/>
											</xsd:complexType>
										</xsd:element>
						</xsd:choice>
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>
						</xsd:choice>

						<!--~~~~~~~~ Interaction_Definition ~~~~~~~~~~-->
						<xsd:element name="Interaction_Definition" minOccurs='0' maxOccurs="1">
							<xsd:complexType>
								<xsd:sequence>
									<!--~~~~~~~~~~~ Interaction ~~~~~~~~~~~~~~~-->
									<xsd:element name="Interaction" minOccurs='1' maxOccurs="unbounded">
										<xsd:complexType>
											<xsd:all>
												<!--~~~~~~ DS_Concerned ~~~~~~-->
												<xsd:element name="DS_Concerned" type="strList" minOccurs='1' maxOccurs='1'/>
												<xsd:element name="Interaction_Content" minOccurs='1' maxOccurs='1'>
													<xsd:complexType>
														<xsd:sequence >
														<xsd:choice minOccurs='1' maxOccurs='1' id='Relation'>
															<xsd:element name="FirstOrderR">
																<xsd:complexType>
																	<xsd:all>
																		<xsd:element name="h" type="pluginDef" minOccurs='1' maxOccurs='1'/>
																		<xsd:element name="g" type="pluginDef" minOccurs='1' maxOccurs='1'/>
																		<xsd:element name="jacobianG" type="listOfMatrices" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="jacobianH" type="listOfMatrices" minOccurs='0' maxOccurs='1'/>
																	</xsd:all>
																	<xsd:attribute name="type" type="xsd:string" use="optional" default="Undefined"/>
																</xsd:complexType>
															</xsd:element>

															<!--~~~~~~~~ Relation ~~~~~~~~-->
															<xsd:element name="FirstOrderLinearR">
																<xsd:complexType>
																	<xsd:all>
																		<xsd:element name="C" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="D" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="F" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="e" type="vector" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="B" type="matrix" minOccurs='0' maxOccurs='1'/>
																	</xsd:all>
																</xsd:complexType>
															</xsd:element>
															<xsd:element name="FirstOrderLinearTIR">
																<xsd:complexType>
																	<xsd:all>
																		<xsd:element name="C" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="D" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="F" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="e" type="vector" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="B" type="matrix" minOccurs='0' maxOccurs='1'/>
																	</xsd:all>
																</xsd:complexType>
															</xsd:element>

															<xsd:element name="LagrangianCompliantR">
																<xsd:complexType>
																	<xsd:all>
																		<xsd:element name="h" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='1'/>
																		<xsd:element name="Jacobianhq" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='2'/>
																		<xsd:element name="Jacobianhlambda" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='3'/>
																	</xsd:all>
																</xsd:complexType>
															</xsd:element>

															<xsd:element name="LagrangianRheonomousR">
																<xsd:complexType>
																	<xsd:all>
																		<xsd:element name="h" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='1'/>
																		<xsd:element name="Jacobianhq" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='2'/>
																		<xsd:element name="JacobianDoth" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='3'/>
																	</xsd:all>
																</xsd:complexType>
															</xsd:element>

															<xsd:element name="LagrangianScleronomousR">
																<xsd:complexType>
																	<xsd:all>
																		<xsd:element name="h" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='1'/>
																		<xsd:element name="Jacobianhq" type="pluginDef" minOccurs='1' maxOccurs='1' cArg:order='2'/>
																		<xsd:element name="JacobianDothq" type="pluginDef" minOccurs='0' maxOccurs='1' cArg:order='3'/>
																	</xsd:all>
																</xsd:complexType>
															</xsd:element>

															<xsd:element name="LagrangianLinearTIR">
																<xsd:complexType>
																	<xsd:all>
																		<xsd:element name="C" type="matrix" minOccurs='1' maxOccurs='1'/>
																		<xsd:element name="D" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="F" type="matrix" minOccurs='0' maxOccurs='1'/>
																		<xsd:element name="e" type="vector" minOccurs='0' maxOccurs='1'/>
																	</xsd:all>
																</xsd:complexType>
															</xsd:element>
														</xsd:choice>

														<!--~~~~~~~ NS_Law ~~~~~~~~~~~-->
														<xsd:choice minOccurs='1' maxOccurs='1' id='NSLaw'>
															<xsd:element name="RelayNSL">
																<xsd:complexType>
																	<xsd:complexContent>
																		<xsd:extension base="NSL">
																			<xsd:all>
																			<xsd:element name="ub" type="xsd:double" minOccurs='0' maxOccurs='1'/>
																			<xsd:element name="lb" type="xsd:double" minOccurs='0' maxOccurs='1'/>
																		</xsd:all>
																		</xsd:extension>
																	</xsd:complexContent>
																</xsd:complexType>
															</xsd:element>

															<xsd:element name="NewtonImpactNSL">
																<xsd:complexType>
																	<xsd:complexContent>
																		<xsd:extension base="NSL">
																			<xsd:all>
																				<xsd:element name="e" type="xsd:double" minOccurs='1' maxOccurs='1'/>
																			</xsd:all>
																		</xsd:extension>
																	</xsd:complexContent>
																</xsd:complexType>
															</xsd:element>

															<xsd:element name="NewtonImpactFrictionNSL">
																<xsd:complexType>
																	<xsd:complexContent>
																		<xsd:extension base="NSL">
																			<xsd:all>
																			<xsd:element name="en" type="xsd:double" minOccurs='0' maxOccurs='1'/>
																			<xsd:element name="et" type="xsd:double" minOccurs='0' maxOccurs='1'/>
																			<xsd:element name="mu" type="xsd:double" minOccurs='0' maxOccurs='1'/>
																		</xsd:all>
																		</xsd:extension>
																	</xsd:complexContent>
																</xsd:complexType>
															</xsd:element>

															<xsd:element name="ComplementarityConditionNSL">
																<xsd:complexType>
																	<xsd:complexContent>
																		<xsd:extension base="NSL">
																		</xsd:extension>
																	</xsd:complexContent>
																</xsd:complexType>
															</xsd:element>
														</xsd:choice>
													</xsd:sequence>
													</xsd:complexType>
												</xsd:element>
											</xsd:all>

											<xsd:attribute name="Name" type="xsd:string" use='optional'/>

										</xsd:complexType>
									</xsd:element>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
					<xsd:attribute name="bvp" type="boolean" use="optional"/>
				</xsd:complexType>
			</xsd:element>


			<!--~~~~~~~~~~~~~~~~~~~~ Simulation ~~~~~~~~~~~~~~~~~~~~~~~~~-->
			<xsd:element name="Simulation" minOccurs='1' maxOccurs='1'>
				<xsd:complexType>
					<xsd:sequence>
						<!--~~~~~~~~~~~~ TimeDiscretisation ~~~~~~~~~~~-->
						<xsd:element name="TimeDiscretisation" minOccurs='1' maxOccurs='1'>
							<xsd:complexType>
								<xsd:choice>
									<xsd:element name="tk" type="vector"/>
								<xsd:element name="h" type="positiveDouble"/>
								<xsd:element name="N" type="xsd:positiveInteger"/>
								</xsd:choice>
							</xsd:complexType>
						</xsd:element>

						<!--~~~~~~~ OneStepIntegrator_Definition ~~~~~~~-->
						<xsd:choice minOccurs='1' maxOccurs='1'>
							<xsd:element name="OneStepIntegrator_LMGC90">
								<xsd:complexType>
									<xsd:sequence>
										<xsd:element name="empty" type="xsd:string" minOccurs='0' maxOccurs='1'/>
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>

							<xsd:element name="OneStepIntegrator_Definition">
								<xsd:complexType>
									<xsd:sequence>
										<!--~~~~~~~~~~~ OneStepIntegrator ~~~~~~~~~~~-->
										<xsd:choice minOccurs='1' maxOccurs='unbounded'>
											<xsd:element name="MoreauJeanOSI">
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="OSI">
															<xsd:sequence>
																	<xsd:element name="Theta" type="emptyType" minOccurs='0' maxOccurs='1'/>
															</xsd:sequence>
														</xsd:extension>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
											<xsd:element name="LsodarOSI">
												<xsd:complexType>
													<xsd:complexContent>
														<xsd:extension base="OSI"/>
													</xsd:complexContent>
												</xsd:complexType>
											</xsd:element>
										</xsd:choice>
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>
						</xsd:choice>


						<!--~~~~~~~~~~~~~ OneStepNSProblem ~~~~~~~~~~~~~~-->
						<xsd:element name="OneStepNSProblems_List" minOccurs="0" maxOccurs="1">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:choice minOccurs="1" maxOccurs="2">
										<xsd:element name="LCP">
											<xsd:complexType>
												<xsd:complexContent>
													<xsd:extension base="OSNSP">
													</xsd:extension>
												</xsd:complexContent>
											</xsd:complexType>
										</xsd:element>

										<xsd:element name="FrictionContact">
											<xsd:complexType>
												<xsd:complexContent>
													<xsd:extension base="OSNSP">
														<xsd:attribute name="Type" type="xsd:positiveInteger" use="required"/>
													</xsd:extension>
												</xsd:complexContent>
											</xsd:complexType>
										</xsd:element>

										<xsd:element name="QP">
											<xsd:complexType>
												<xsd:complexContent>
													<xsd:extension base="OSNSP">
														<xsd:sequence>
															<xsd:element name="Q" type="matrix" minOccurs="0" maxOccurs="1"/>
															<xsd:element name="p" type="vector" minOccurs="0" maxOccurs="1"/>
														</xsd:sequence>
													</xsd:extension>
												</xsd:complexContent>
											</xsd:complexType>
										</xsd:element>

										<xsd:element name="Relay">
											<xsd:complexType>
												<xsd:complexContent>
													<xsd:extension base="OSNSP">
														<xsd:sequence>
															<xsd:element name="M" type="matrix" minOccurs="0" maxOccurs="1"/>
															<xsd:element name="q" type="vector" minOccurs="0" maxOccurs="1"/>
														</xsd:sequence>
													</xsd:extension>
												</xsd:complexContent>
											</xsd:complexType>
										</xsd:element>
									</xsd:choice>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>

					</xsd:sequence>
					<xsd:attribute name="type" type="PossibleSimulationValues" use="required"/>
				</xsd:complexType>
			</xsd:element>


		</xsd:sequence>

	</xsd:complexType>
</xsd:element>

</xsd:schema>
