Operations research using GNU

I attended my operations research internals today and i have been one of the few who have failed in both the previous ones.My aversion towards mark and internals have virtually took me away from the mainstream mark savy geeks of my class.There was a question on linear programming using simplex algorithm.There was a controversy regarding the answer the geek group of the class had an answer which in my opinion was baseless,it was against the given constraint.As one of the constraint said x1>=4 but the answer was x1=10/3 which was less than 4.But anyways its the official answer coz after all  the
se are the great minds.I thought of using the GNU linear programming tool kit to solve it:

/* Decision variables */
var x1 >=0;  /* soldier */
var x2 >=0;  /* train */

/* Objective function */
maximize z: 3*x1 + 2*x2;

/* Constraints */
s.t. Finishing :2*x1 + x2 <= 10;
s.t. Carpentry :x1 + 2*x2 <= 10;
s.t. Demand    : x1 >= 4;

I ran it using the glpsol to obtain the answer:

Objective:  z = 16 (MAXimum)

1 x1           B              4             0
2 x2           B              2             0
Thus the solution is x1=4 and x2=2 and max z=16.I could have easily argued but now a days i dont know why i never feel like proving things.If people stumble upon this blog will their neural networks accept without prejudice.


2 responses to “Operations research using GNU

  1. that was realy nice , 10/3 is not the correct ans though , i also had the same prob arguing with ppl abt x>=4 😉 .
    i don basically think i render justice to OR 😉 cos i don know wat formula i use, and y and how that came into existence ever , i feel its pointless until i completely read it serving the purpose of it 😉

  2. I believe wikipedia is a good resource for OR related thingy.Its interesting but frankly neither do i know anything

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s