commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LEONID ILYEVSKY <leonidilyev...@yahoo.com>
Subject [math] SimplexTableau.java
Date Tue, 12 Oct 2010 15:10:43 GMT
Hi,

I have two questions.

I was going through the SimplexTableau.java code, tried to understand every line 
of it. In the dropPhase1Objective() method I was puzzled a little bit, maybe you 
can explain.
You are dropping positive cost non-artificial variables, which means that some 
original decision variable may be dropped in the process. However, that decision 
variable may be 

still there in the main objective Z and the constraints. Or is it now 
substituted by a basic artificial variable?
Also, according to the getSolution() code, I see that the dropped variable will 
be assumed to have zero value. Again, I don't quite understand how that is going 
to work.
I would understand if in dropPhase1Objective()  you would examine the positive 
cost of the variable regarding the main Z objective, but you do it for the 
phase1 W objective (row # 0):


// positive cost non-artificial variables
for (int i = getNumObjectiveFunctions(); i < getArtificialVariableOffset(); i++) 
{
if (MathUtils.compareTo(tableau.getEntry(0, i), 0, epsilon) > 0) {
columnsToDrop.add(i);
}
}

Another question. I actually need to solve the quadratic optimization, which is 
done by modified simplex method. This is why I was studying the code. Are there 
any plans to add it in the apache.commons.math?
I saw a few free implementations, but each of them uses there own libraries for 
basic matrix/vector math, and I would really prefer to stick with apache. So I 
was thinking of doing it myself based on your current code.

Thanks,

Leonid

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message