title: PuLP programming output
body: <p>I am working with a collaborator on a certain optimization project involving linear programming. We both use Coin-OR branch-and-cut solver to solve the problem. I construct the .LP file using Python-based PuLP package. I am not entirely sure how the collaborator creates their .LP file (definitely not using Python), but essentially, we  have two different systems generating .LP files for the exact same problem  - i.e. the objective function, variables, constraints are exactly the same.</p>
  
  <p>I typically solve my problem within Python (<code>myProblm.solve()</code>), but I have also been generating a .LP file and calling a CBC solver from the command line to solve this file (problem). Next, I compare the output I get from my system (either Python or command-line), to that my collaborator obtains. [Please note that the output of the problem on my side is <em>exactly</em> the same whether solved in PuLP or on command-line.]</p>
  
  <p>The values of the objective function match well between us, but the other details do not exactly match. For example, if we were to solve <a href="https://pythonhosted.org/PuLP/CaseStudies/a_blending_problem.html" rel="nofollow noreferrer">this Whiskas blending problem</a>, the total cost of ingredients would be exactly same, but the ratios of ingredients differ. Any idea why that would be?</p>
  
  <p>I manually compared our .LP files and noticed a few differences. For starters, the sequence of constraints and variables is different. In other words, if there are 5 constraints, my file lists them as <code>C1,C2,C5,C4,C3</code>, whereas the same constraints will be listed as <code>C1,C2,C3,C4,C5</code>. Also, my Python code rounds all numbers to 10's place, while his system rounds them to 1's place. Hence, the coefficients of some of the variables have slightly different values.</p>
  
  <p>Do these differences play a role in the exact output of the solver?</p>
  
  <p>Also, the next question by extension is: What should we do to get the exact same output when solving a linear programming optimization problem? Which factors influence the solution of LP problems? Do factors like the structure of an .LP file play a role? Will I get the exact same output if I run the same LP file with exact same conditions on different computers?</p>