<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello Jennifer,<br>
      <br>
      Are you certain that our problems are worrectly written?<br>
      <br>
      For intstance, why is there a "2" alone in a line of the first
      problem ? And why do your right-hand side elements all have "x"
      ("0x", "1x", "15x")?<br>
      <br>
      I cannot rewrite them but I can tell you that yes, karmarkar
      allows to solve such problems.<br>
      Just have a look at its help page :
      <a class="moz-txt-link-freetext" href="http://help.scilab.org/docs/5.4.1/fr_FR/karmarkar.html">http://help.scilab.org/docs/5.4.1/fr_FR/karmarkar.html</a><br>
      <br>
      Your first problem should look something like this:<br>
      c = [1 -2 0 0 4]'; // Main problem<br>
      Aeq = [1 0 -1 0 0 ; ? ? ? ? ? ; 1 -2 4  0 -4 ; ? 2 0 1 -4 ; ? 1 1
      1 1]; // Equations<br>
      beq = [0 ? 0 0 1]; // Right-hand side<br>
      <br>
      [xopt, fopt, exitflag, iter, yopt] = karmarkar(Aeq, beq, c)<br>
      <br>
      If the solution is not all positive (inequality constraint), add
      an inequality matrix A, like in the help page.<br>
      <br>
      Hope that helps,<br>
      Paul.<br>
      <br>
      <br>
      On 10/10/2013 05:38 AM, Jennifer Basbas wrote:<br>
    </div>
    <blockquote
cite="mid:CAJMU6_V8k3CLGjan33UY+C_EfWyn3sDPDCA91ySUgp_VYb=4Yg@mail.gmail.com"
      type="cite">
      <div>Dear All,<br>
         <br>
        I am new to Scilab and I'm wondering if anyone can help me solve
        the following minimization problem in linear programming using
        Scilab:</div>
      <div><br>
        1. Apply Karmarkar's algorithm to solve<br>
        Minimize -<br>
        x1 - 2x2 + 4x5subject to<br>
        x2 - x3 = 0<br>
        2<br>
        x1 - 2x2 + 4x3 - 4x5 = 0x<br>
        1 + 2x2 + x4 - 4x5 = 0x<br>
        1 + x2 + x3 + x4 + x5 = 1x<br>
        1, x2, x3, x4, x5 >= 0<br>
         <br>
        2. Apply the primal affne scaling algorithm to solve<br>
        Minimize -<br>
        2x1 + x2subject to<br>
        x1 - x2 + x3 = 15x<br>
        2 + x4 = 15x<br>
        1, x2, x3, x4 >= 0<br>
        Hint: The optimal solution is<br>
        x* = [30 15 0 0]T with optimal value -45.</div>
      <div> </div>
      <div>Any inputs will be greatly appreciated. Thank you.</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Paul BIGNIER
Scilab Engineer & Xcos Developer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.69
<a class="moz-txt-link-freetext" href="http://www.scilab-enterprises.com">http://www.scilab-enterprises.com</a></pre>
  </body>
</html>