All The Dots Are Connected / It's Not Rocket Science

Transportation and assignment problems with r.

In the previous post “ Linear Programming with R ” we examined the approach to solve general linear programming problems with “Rglpk” and “lpSolve” packages. Today, let’s explore “lpSolve” package in depth with two specific problems of linear programming: transportation and assignment.

1. Transportation problem

assignment problem lpsolve

Code & Output:

The solution is shown as lptrans$solution and the total cost is 20500 as lptrans$objval.

2. Assignment problem

assignment problem lpsolve

Similarly, the solution and the total cost are shown as lpassign$solution and lpassign$objval respectively.

guest

This article was really helpful, but I am facing issue while solving unbalanced transportation problem when there is excess demand. Could you please guide me on what has to be done in this case.

Bakula Venroo

Hello sir, this article was really helpful. But, I am facing issue while solving unbalanced transportation problem when there is excess demand, it gives solution as no feasible solution. works perfectly fine for balanced and excess supply problems. Could you please guide me on why this issue is occurring and a possible solution for the same. Thank you.

Welcome to lpSolveAPI project!

Using lp_solve in r.

R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R. For more information or to download R please visit the R website .

There are currently two R packages based on lp_solve. The lpSolve package provides high-level functions for solving general linear/integer problems, assignment problems and transportation problems. The lpSolveAPI package provides a complete implementation of the lp_solve API. The lpSolveAPI package has a lot more functionality than lpSolve , however, it also has a slightly more difficult learning curve. Both packages are available from CRAN .

Caveat (19.04.2011): the lpSolve package is based on lp_solve version 5.5.0.7 which was released on 27.12.2007. The current version of lp_solve (used in the lpSolveAPI package) is 5.5.2.0 and was released on 22.08.2010.

You can find the project summary page here .

Installation

To install the lpSolve package use the command: > install.packages("lpSolve") and to install the lpSolveAPI package use the command: > install.packages("lpSolveAPI") After the packages have been downloaded and installed, you can load them into your R session using the library function, e.g., > library(lpSolveAPI) This needs to be done once in each R session (i.e., every time you launch R).

The > shown before each R command is the R prompt. Only the text after > should be entered.

Getting Help

Documentation for the lpSolve and lpSolveAPI packages is provided using R's built-in help system. For example, the command > ?make.lp will display the documentation for the make.lp function. You can list all of the functions in the lpSolveAPI package with the following command. > ls("package:lpSolveAPI") The documentation for each of these functions can be accessed using the ? operator. Note that you must append .lpExtPtr to the names of the generic functions ( dim , dimnames , plot , print and solve ), otherwise you will get the documentation for the standard generic function.

Building and Solving Linear Programs Using the lpSolveAPI Package

The lpSolveAPI package provides an API for building and solving linear programs that mimics the lp_solve C API. This approach allows greater flexibility but also has a few caveats. The most important is that the lpSolve linear program model objects created by make.lp and read.lp are not actually R objects. Rather, they are pointers to lp_solve 'lprec' structures which are created and store externally. R does not know how to deal with these structures. In particular, R cannot duplicate them. You should never assign an lpSolve linear program model object in R code.

Consider the following example. First we create an empty model x. > x Then we assign x to y. > y Next we set some columns in x. > set.column(x, 1, c(1, 2)) > set.column(x, 2, c(3, 4)) And finally, take a look at y. > y Model name: C1 C2 Minimize 0 0 R1 1 3 free 0 R2 2 4 free 0 Type Real Real upbo Inf Inf lowbo 0 0 The changes we made in x appear in y as well. Although x and y are two distinct objects in R, they both refer to the same lp_solve 'lprec' structure.

The safest way to use the lpSolve API is inside an R function - do not return the lpSolve linear program model object.

A brief Example

lpSolve: Interface to 'Lp_solve' v. 5.5 to Solve Linear/Integer Programs

Lp_solve is freely available (under LGPL 2) software for solving linear, integer and mixed integer programs. In this implementation we supply a "wrapper" function in C and some R functions that solve general linear/integer problems, assignment problems, and transportation problems. This version calls lp_solve version 5.5.

Documentation:

Reverse dependencies:.

Please use the canonical form https://CRAN.R-project.org/package=lpSolve to link to this page.

lp.assign: Integer Programming for the Assignment Problem

Description.

Interface to lp_solve linear/integer programming system specifically for solving assignment problems

An lp object. See documentation for details. The constraints are assumed (each row adds to 1, each column adds to 1, and no others) and are not returned.

Matrix of costs: the ij-th element is the cost of assigning source i to destination j.

Character vector, length 1, containing either "min" (the default) or "max"

Numeric: presolve? Default 0 (no); any non-zero value means "yes." Currently ignored.

Numeric: compute sensitivity? Default 0 (no); any non-zero value means "yes." In that case presolving is attempted.

Sam Buttrey, [email protected]

This is a particular integer programming problem. All the decision variables are assumed to be integers; each row has the constraint that its entries must add up to 1 (so that there is one 1 and the remaining entries are 0) and each column has the same constraint. This is assumed to be a minimization problem.

lp , lp.transport

Solve Linear Sum Assignment Problem

Description.

Solve the linear sum assignment problem using the Hungarian method.

If nr and nc are the numbers of rows and columns of x , solve_LSAP finds an optimal assignment of rows to columns, i.e., a one-to-one map p of the numbers from 1 to nr to the numbers from 1 to nc (a permutation of these numbers in case x is a square matrix) such that \sum_{i=1}^{nr} x[i, p[i]] is minimized or maximized.

This assignment can be found using a linear program (and package lpSolve provides a function lp.assign for doing so), but typically more efficiently and provably in polynomial time O(n^3) using primal-dual methods such as the so-called Hungarian method (see the references).

An object of class "solve_LSAP" with the optimal assignment of rows to columns.

Walter Böhm [email protected] kindly provided C code implementing the Hungarian method.

C. Papadimitriou and K. Steiglitz (1982), Combinatorial Optimization: Algorithms and Complexity . Englewood Cliffs: Prentice Hall.

SCDA

  • Linear programming

Solving linear transport problem with lp.transport in R, using lpSolve

  • Linnart Felkl

assignment problem lpsolve

The transportation problem is one of the classical problems teached in linear programming classes. The problem, put simply, states that a given set of customers with a specified demand must be satisfied by another set of supplier with certain capacities (“supply”). For a detailed explanation of the transportation problem you can, e.g. read this:  https://econweb.ucsd.edu/~jsobel/172aw02/notes8.pdf .

The lpSolve package available in R can be used for modelling and solving the transportation problem.

I will show how to do this. I define a problem in which 3 suppliers seek to satisfy 4 customers. The suppliers have capacities 100, 300, and 400, respectively. The customers have demand 100, 100, 200, and 400, respectively. Furthermore, the cost for supplying customer i by supplier j is defined for every possible combination and stated in a cost matrix.

Using this information we can model and solve the transportation problem (deciding which demand to fulfill by which supplier) with the lpSolve package in R.

First, I prepare the modeling-part:

Then, I solve the problem:

Let us review the “optimal” costs:

Let us review the optimal solution of the transportation problem (i.e., the optimal material flows to this problem):

The assignment problem is another classical problem, and you can see how I solved it in R here: Cost minimal production scheduling – solving the assignment problem with lpSolve, using lp.assign.

assignment problem lpsolve

Data scientist focusing on simulation, optimization and modeling in R, SQL, VBA and Python

You May Also Like

assignment problem lpsolve

Optimized SCM capacity scheduling

assignment problem lpsolve

Inventory simulation for optimized stock

assignment problem lpsolve

Conveyor system optimization procedure

Leave a reply.

  • Default Comments
  • Facebook Comments

hi. I am trying to “go to the next level”. I want to look deeper than this and say, “OK, truck A costs me $100 and takes 3 weeks, but flight A costs me $200 and takes just 1 week to move the good” For me, i am still trying to move things from A to B, but now i am expanding it to try and look at the total cost of holding the inventory, reduction in cash flow and the cost of delivery. I want to “optimise” my transportation so that maybe 90% of my forecast is shipped via truck, then i can “top up” with the flight if demand requires. Any suggestions how to approach this issue or where to turn for some guidance? Thanks

thanks for your comment.

You can try to formulate your problem as a linear optimization problem, from scratch. For example, the cost of holding inventory can be derived from the travel time, and the travel time depends on transportation distance (one variable) and transportation mode (binary or integer variable).

The objective of covering 90% of your forecast by truck could be formulated as a constraint, or maybe a better approach would be to define two objective functions, and to apply multi-goal linear programming.

If you provide some more info I might very well try to model it and post it, maybe in a simplified version!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed .

  • Entries feed
  • Comments feed
  • WordPress.org

Privacy Overview

  • Share full article

Advertisement

Supported by

Guest Essay

The Problem With Saying ‘Sex Assigned at Birth’

A black and white photo of newborns in bassinets in the hospital.

By Alex Byrne and Carole K. Hooven

Mr. Byrne is a philosopher and the author of “Trouble With Gender: Sex Facts, Gender Fictions.” Ms. Hooven is an evolutionary biologist and the author of “T: The Story of Testosterone, the Hormone That Dominates and Divides Us.”

As you may have noticed, “sex” is out, and “sex assigned at birth” is in. Instead of asking for a person’s sex, some medical and camp forms these days ask for “sex assigned at birth” or “assigned sex” (often in addition to gender identity). The American Medical Association and the American Psychological Association endorse this terminology; its use has also exploded in academic articles. The Cleveland Clinic’s online glossary of diseases and conditions tells us that the “inability to achieve or maintain an erection” is a symptom of sexual dysfunction, not in “males,” but in “people assigned male at birth.”

This trend began around a decade ago, part of an increasing emphasis in society on emotional comfort and insulation from offense — what some have called “ safetyism .” “Sex” is now often seen as a biased or insensitive word because it may fail to reflect how people identify themselves. One reason for the adoption of “assigned sex,” therefore, is that it supplies respectful euphemisms, softening what to some nonbinary and transgender people, among others, can feel like a harsh biological reality. Saying that someone was “assigned female at birth” is taken to be an indirect and more polite way of communicating that the person is biologically female. The terminology can also function to signal solidarity with trans and nonbinary people, as well as convey the radical idea that our traditional understanding of sex is outdated.

The shift to “sex assigned at birth” may be well intentioned, but it is not progress. We are not against politeness or expressions of solidarity, but “sex assigned at birth” can confuse people and creates doubt about a biological fact when there shouldn’t be any. Nor is the phrase called for because our traditional understanding of sex needs correcting — it doesn’t.

This matters because sex matters. Sex is a fundamental biological feature with significant consequences for our species, so there are costs to encouraging misconceptions about it.

Sex matters for health, safety and social policy and interacts in complicated ways with culture. Women are nearly twice as likely as men to experience harmful side effects from drugs, a problem that may be ameliorated by reducing drug doses for females. Males, meanwhile, are more likely to die from Covid-19 and cancer, and commit the vast majority of homicides and sexual assaults . We aren’t suggesting that “assigned sex” will increase the death toll. However, terminology about important matters should be as clear as possible.

More generally, the interaction between sex and human culture is crucial to understanding psychological and physical differences between boys and girls, men and women. We cannot have such understanding unless we know what sex is, which means having the linguistic tools necessary to discuss it. The Associated Press cautions journalists that describing women as “female” may be objectionable because “it can be seen as emphasizing biology,” but sometimes biology is highly relevant. The heated debate about transgender women participating in female sports is an example ; whatever view one takes on the matter, biologically driven athletic differences between the sexes are real.

When influential organizations and individuals promote “sex assigned at birth,” they are encouraging a culture in which citizens can be shamed for using words like “sex,” “male” and “female” that are familiar to everyone in society, as well as necessary to discuss the implications of sex. This is not the usual kind of censoriousness, which discourages the public endorsement of certain opinions. It is more subtle, repressing the very vocabulary needed to discuss the opinions in the first place.

A proponent of the new language may object, arguing that sex is not being avoided, but merely addressed and described with greater empathy. The introduction of euphemisms to ease uncomfortable associations with old words happens all the time — for instance “plus sized” as a replacement for “overweight.” Admittedly, the effects may be short-lived , because euphemisms themselves often become offensive, and indeed “larger-bodied” is now often preferred to “plus sized.” But what’s the harm? No one gets confused, and the euphemisms allow us to express extra sensitivity. Some see “sex assigned at birth” in the same positive light: It’s a way of talking about sex that is gender-affirming and inclusive .

The problem is that “sex assigned at birth”— unlike “larger-bodied”— is very misleading. Saying that someone was “assigned female at birth” suggests that the person’s sex is at best a matter of educated guesswork. “Assigned” can connote arbitrariness — as in “assigned classroom seating” — and so “sex assigned at birth” can also suggest that there is no objective reality behind “male” and “female,” no biological categories to which the words refer.

Contrary to what we might assume, avoiding “sex” doesn’t serve the cause of inclusivity: not speaking plainly about males and females is patronizing. We sometimes sugarcoat the biological facts for children, but competent adults deserve straight talk. Nor are circumlocutions needed to secure personal protections and rights, including transgender rights. In the Supreme Court’s Bostock v. Clayton County decision in 2020, which outlawed workplace discrimination against gay and transgender people, Justice Neil Gorsuch used “sex,” not “sex assigned at birth.”

A more radical proponent of “assigned sex” will object that the very idea of sex as a biological fact is suspect. According to this view — associated with the French philosopher Michel Foucault and, more recently, the American philosopher Judith Butler — sex is somehow a cultural production, the result of labeling babies male or female. “Sex assigned at birth” should therefore be preferred over “sex,” not because it is more polite, but because it is more accurate.

This position tacitly assumes that humans are exempt from the natural order. If only! Alas, we are animals. Sexed organisms were present on Earth at least a billion years ago, and males and females would have been around even if humans had never evolved. Sex is not in any sense the result of linguistic ceremonies in the delivery room or other cultural practices. Lonesome George, the long-lived Galápagos giant tortoise , was male. He was not assigned male at birth — or rather, in George’s case, at hatching. A baby abandoned at birth may not have been assigned male or female by anyone, yet the baby still has a sex. Despite the confusion sown by some scholars, we can be confident that the sex binary is not a human invention.

Another downside of “assigned sex” is that it biases the conversation away from established biological facts and infuses it with a sociopolitical agenda, which only serves to intensify social and political divisions. We need shared language that can help us clearly state opinions and develop the best policies on medical, social and legal issues. That shared language is the starting point for mutual understanding and democratic deliberation, even if strong disagreement remains.

What can be done? The ascendance of “sex assigned at birth” is not an example of unhurried and organic linguistic change. As recently as 2012 The New York Times reported on the new fashion for gender-reveal parties, “during which expectant parents share the moment they discover their baby’s sex.” In the intervening decade, sex has gone from being “discovered” to “assigned” because so many authorities insisted on the new usage. In the face of organic change, resistance is usually futile. Fortunately, a trend that is imposed top-down is often easier to reverse.

Admittedly, no one individual, or even a small group, can turn the lumbering ship of English around. But if professional organizations change their style guides and glossaries, we can expect that their members will largely follow suit. And organizations in turn respond to lobbying from their members. Journalists, medical professionals, academics and others have the collective power to restore language that more faithfully reflects reality. We will have to wait for them to do that.

Meanwhile, we can each apply Strunk and White’s famous advice in “The Elements of Style” to “sex assigned at birth”: omit needless words.

Alex Byrne is a professor of philosophy at M.I.T. and the author of “Trouble With Gender: Sex Facts, Gender Fictions.” Carole K. Hooven is an evolutionary biologist, a nonresident senior fellow at the American Enterprise Institute, an associate in the Harvard psychology department, and the author of “T: The Story of Testosterone, the Hormone That Dominates and Divides Us.”

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips . And here’s our email: [email protected] .

Follow The New York Times Opinion section on Facebook , Instagram , TikTok , WhatsApp , X and Threads .

RlpSolve Interface to Lp_solve v. 5.5 to solve linear/integer programs

  • lpSolve: Linear and Integer Programming
  • Browse all...

RlpSolve: Interface to Lp_solve v. 5.5 to solve linear/integer programs

Lp_solve is freely available (under LGPL 2) software for solving linear, integer and mixed integer programs. In this implementation we supply a "wrapper" function in C and some R functions that solve general linear/integer problems, assignment problems, and transportation problems. This version calls lp_solve version 5.5. THIS PACKAGE IS MODIFIED FOR PORTFOLIO OPTIMIZATION WITH RMETRICS. FOR OTHER PURPOSES PLEASE USE THE ORIGINAL PACKAGE ON THE CRAN SERVER.

Getting started

Browse package contents, try the rlpsolve package in your browser.

Any scripts or data that you put into this service are public.

R Package Documentation

Browse r packages, we want your feedback.

assignment problem lpsolve

Add the following code to your website.

REMOVE THIS Copy to clipboard

For more information on customizing the embed code, read Embedding Snippets .

IMAGES

  1. 1. (15 points) Learn and use R "lpSolve" package to

    assignment problem lpsolve

  2. How to construct & solve a linear programming problem using lpsolve in

    assignment problem lpsolve

  3. Formulation of an lp problem in lpsolve

    assignment problem lpsolve

  4. [EN 17] binary assignment problem solved with lpSolve in R

    assignment problem lpsolve

  5. Using LPSolve IDE to Solve OR Problem

    assignment problem lpsolve

  6. Problem/Solution (Proposal) Assignment

    assignment problem lpsolve

VIDEO

  1. BSAD 320 Workplace Problem Assignment 6 1 Tiffany Harris

  2. Mechanics assignment -3 problem-1; solution

  3. Mechanics assignment -3 problem -5 solution

  4. Mechanics assignment -3 problem 6 solution

  5. Solve the following minimal assignment problem

  6. Bandgap Reference Circuit Problem II NPTEL Assignment Question

COMMENTS

  1. Transportation and Assignment problems with R

    In the previous post "Linear Programming with R" we examined the approach to solve general linear programming problems with "Rglpk" and "lpSolve" packages. Today, let's explore "lpSolve" package in depth with two specific problems of linear programming: transportation and assignment. 1. Transportation problem

  2. Operations Research with R

    The assignment problem represents a special case of linear programming problem used for allocating resources (mostly workforce) in an optimal way; it is a highly useful tool for operation and project managers for optimizing costs. The lpSolve R package allows us to solve LP assignment problems with just very few lines of code.

  3. PDF lpSolve: Interface to 'Lp solve' v. 5.5 to Solve Linear/Integer Programs

    Title Interface to 'Lp_solve' v. 5.5 to Solve Linear/Integer Programs. Author Michel Berkelaar and others. Maintainer Gábor Csárdi <[email protected]> Description Lp_solve is freely available (under LGPL 2) software for solving linear, integer and mixed integer programs. In this implementation we supply a ``wrapper'' function in C and ...

  4. [EN 17] binary assignment problem solved with lpSolve in R

    The assignment problem is a special linear problem. lpSolve provides a dedicated function for solving this problem in R. Full coding example is available her...

  5. R: Integer Programming for the Assignment Problem

    Details. This is a particular integer programming problem. All the decision variables are assumed to be integers; each row has the constraint that its entries must add up to 1 (so that there is one 1 and the remaining entries are 0) and each column has the same constraint. This is assumed to be a minimization problem.

  6. Solving assignment problem with lpSolve in R

    The mathematical model for this looks as follows: We can model and solve this problem with the lpSolve package in R, a package for linear programming (for continous and integer problems). The lp.assign function can do the job: library( lpSolve ) # prepare the cost matrix. cost.mat <- rbind(c(1,2,3),

  7. Using lpsolve from R

    The lpSolve R package is the first implementation of an interface of lpsolve to R. It provides high-level functions for solving general linear/integer problems, assignment problems and transportation problems. The following link contains the version of the driver: lpSolve: Interface to Lp_solve v. 5.5 to solve linear/integer programs. It does ...

  8. lp_solve reference guide (5.5.2.5)

    Also see Formulation of an lp problem in lpsolve. lp_solve is a free(see LGPLfor the GNU lesser general public license) linear (integer) programming solver based on the revised simplex method and the Branch-and-bound method for the integers. It contains full source, examples and manuals. lp_solve solves pure linear, (mixed) integer/binary, semi ...

  9. lpsolve

    The lpSolve package provides high-level functions for solving general linear/integer problems, assignment problems and transportation problems. The lpSolveAPI package provides a complete implementation of the lp_solve API. The lpSolveAPI package has a lot more functionality than lpSolve, however, it also has a slightly more difficult learning ...

  10. lpSolve package

    Description. Lp_solve is freely available (under LGPL 2) software for solving linear, integer and mixed integer programs. In this implementation we supply a "wrapper" function in C and some R functions that solve general linear/integer problems, assignment problems, and transportation problems. This version calls lp_solve version 5.5. Lp_solve ...

  11. DIMACS assignment problems

    For assignment problem instances the problem line has the following format: p asn NODES ARCS. The lower-case character p signifies that this is a problem line. The three-character problem designator asn identifies the file as containing specification information for an assignment problem.

  12. Solving a simple linear programming problem using lpSolve in R

    In this post I show how to conduct simple linear optimization in R. You can also find other posts written by me that look at other linear optimization tasks, suchs as the transportation problem (can be solved with lp.transport), the assignment problem (can be solved with lp.assign) and integer linear programming (also linear mixed integer problems can be solved in R).

  13. CRAN

    lpSolve: Interface to 'Lp_solve' v. 5.5 to Solve Linear/Integer Programs Lp_solve is freely available (under LGPL 2) software for solving linear, integer and mixed integer programs. In this implementation we supply a "wrapper" function in C and some R functions that solve general linear/integer problems, assignment problems, and transportation ...

  14. lpSolve: Interface to 'Lp_solve' v. 5.5 to Solve Linear/Integer

    Lp_solve is freely available (under LGPL 2) software for solving linear, integer and mixed integer programs. In this implementation we supply a "wrapper" function in C and some R functions that solve general linear/integer problems, assignment problems, and transportation problems. This version calls lp_solve version 5.5.

  15. lp.assign: Integer Programming for the Assignment Problem in lpSolve

    This is a particular integer programming problem. All the decision variables are assumed to be integers; each row has the constraint that its entries must add up to 1 (so that there is one 1 and the remaining entries are 0) and each column has the same constraint. This is assumed to be a minimization problem. Value. An lp object. See ...

  16. lp.assign function

    Details. This is a particular integer programming problem. All the decision variables are assumed to be integers; each row has the constraint that its entries must add up to 1 (so that there is one 1 and the remaining entries are 0) and each column has the same constraint. This is assumed to be a minimization problem.

  17. How should i set up linear model in R using lpSolve() library

    The lpSolve documentation describes how a specific model for assignment problems is already implemented: This is a particular integer programming problem. All the decision variables are assumed to be integers; each row has the constraint that its entries must add up to 1 (so that there is one 1 and the remaining entries are 0) and each column ...

  18. lpsolve

    It then uses the lpSolveAPI package to create an LP problem, set the problem type, decision variable types, and constraints, and then solves the LP problem. The function returns a list containing the optimal solution and the objective function value, which can be accessed by the user. The function is then called with specific inputs and the ...

  19. R: Solve Linear Sum Assignment Problem

    This assignment can be found using a linear program (and package lpSolve provides a function lp.assign for doing so), but typically more efficiently and provably in polynomial time O(n^3) using primal-dual methods such as the so-called Hungarian method (see the references). Value

  20. Solving linear transport problem with lp.transport in R, using lpSolve

    The assignment problem is another classical problem, and you can see how I solved it in R here: Cost minimal production scheduling - solving the assignment problem with lpSolve, using lp.assign. Linnart Felkl. Data scientist focusing on simulation, optimization and modeling in R, SQL, VBA and Python.

  21. Linear Programming with R. Exploring the "lpSolve" R package

    Linear Programming R Code. Solution: The maximum z value (and thus, the optimum) that can be obtained while satisfying the given constraints is 46, where x1 = 5 and x2 = 3.The sensitivity coefficients go from 4.667 and 5.0 to 7.0 and 7.5. The shadow/dual prices of the constraints are 0, 2 and 1, while for the decision variables are 0 and 0, respectively.

  22. Opinion

    In the Supreme Court's Bostock v. Clayton County decision in 2020, which outlawed workplace discrimination against gay and transgender people, Justice Neil Gorsuch used "sex," not "sex ...

  23. RlpSolve: Interface to Lp_solve v. 5.5 to solve linear/integer programs

    Lp_solve is freely available (under LGPL 2) software for solving linear, integer and mixed integer programs. In this implementation we supply a "wrapper" function in C and some R functions that solve general linear/integer problems, assignment problems, and transportation problems. This version calls lp_solve version 5.5. THIS PACKAGE IS MODIFIED FOR PORTFOLIO OPTIMIZATION WITH RMETRICS. FOR ...