summaryrefslogtreecommitdiff
path: root/help/en_US/Symphony Native Function/sym_addConstr.xml
diff options
context:
space:
mode:
Diffstat (limited to 'help/en_US/Symphony Native Function/sym_addConstr.xml')
-rw-r--r--help/en_US/Symphony Native Function/sym_addConstr.xml76
1 files changed, 76 insertions, 0 deletions
diff --git a/help/en_US/Symphony Native Function/sym_addConstr.xml b/help/en_US/Symphony Native Function/sym_addConstr.xml
new file mode 100644
index 0000000..89ec114
--- /dev/null
+++ b/help/en_US/Symphony Native Function/sym_addConstr.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry version="5.0-subset Scilab" xml:id="sym_addConstr" xml:lang="en"
+ xmlns="http://docbook.org/ns/docbook"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:ns3="http://www.w3.org/1999/xhtml"
+ xmlns:mml="http://www.w3.org/1998/Math/MathML"
+ xmlns:db="http://docbook.org/ns/docbook">
+
+ <refnamediv>
+ <refname>sym_addConstr</refname>
+ <refpurpose>Add a new constraint</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <title>Calling Sequence</title>
+ <synopsis>sym_addConstr(coeff,type,bound1[,bound2])</synopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>This function adds a new constraint from scratch. Supported types of constraints are less than or equal to, more than or equal to, equal to, or ranged.</para>
+ <para>The last argument is only required for ranged constraints. For the other types of constraints, only the third argument is required.</para>
+
+ </refsection>
+
+ <refsection>
+ <title>Arguments</title>
+
+ <variablelist>
+ <varlistentry>
+ <term>coeff</term>
+ <listitem><para>Sparse matrix representing coefficients of the variables in the new constraint (must have 1 row and number of columns equal to number of variables)</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>type</term>
+ <listitem><para>Type of the new constraint. Supported types: less than or equal to ("L"), greater than or equal to ("G"), equal to ("E"), or ranged ("R")</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>bound1</term>
+ <listitem><para>The first (or only) bound for the constraint</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>bound2</term>
+ <listitem><para>The second bound for ranged constraints. The two bounds for ranged constraints can be in any order.</para></listitem>
+ </varlistentry>
+ </variablelist>
+
+ </refsection>
+
+ <refsection>
+ <title>Return value</title>
+
+ <para>Returns 0</para>
+
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <programlisting role="example">sym_addConstr(sparse([0,0,1,0,2]),"R",0,10)</programlisting>
+ <programlisting role="example">sym_addConstr(sparse([0,0,1,1,0]),"G",4)</programlisting>
+
+ </refsection>
+
+ <refsection>
+ <title>Authors</title>
+
+ <simplelist type="vert">
+ <member>Keyur Joshi</member>
+
+ </simplelist>
+ </refsection>
+</refentry>
+