Linear programming with scilab 5

Michaël Baudin michael.baudin at scilab.org
Tue Jul 19 16:14:51 CEST 2011


Alberto Marin <amsanguino at ...> writes:

> 
> 
> Linpro can indeed be installed in scilab 5.3, and it works fine when I use it 
in scilab. However, any attempt to call linpro from through the Java interface 
leads to a general crash:# A fatal error has been detected by the Java Runtime 
Environment:
> ##  SIGSEGV (0xb) at pc=0x00007fc925a8571e, pid=5580, tid=140502169204480## 
JRE version: 6.0_20-b20# Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode 
linux-amd64 compressed oops)# Derivative: IcedTea6 1.9.8
> # Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.8-0ubuntu1~10.04.1# 
Problematic frame:# C  [libscioutput_stream.so.5+0x871e]  msgs_+0x2e## An error 
report file with more information is saved as:# 
/home/amarin/NetBeansProjects/newst cambio/CaMBio/hs_err_pid5580.log
> ## If you would like to submit a bug report, please include# instructions how 
to reproduce the bug and visit:#   
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/This happened to me also 
with linpro in scilab 4.2 in every 64 bits machine (as far as I've tested, it is 
the same now) and it  is the reason why I decided to upgrade in the first place. 
If anyone could provide insight in this error or how to use Karmarkar to solve 
these rank deficient problems I would be really grateful. All the best,Alberto

Hi,

The two statements :

atomsInstall("quapro");
atomsLoad("quapro");

will make the linpro function available in your Scilab. Once done, I find fopt=-
100. On the other hand, xopt is nonzero for only 20 components. 

I noticed that the code can be made simpler if I replace the "0.0" values by 
"0", which have the same meaning in Scilab.

If I understand it well, your problem has 93 bounded unknowns, 96 equality 
constraints and 3 inequality constraints :

-->size(obj)
 ans  =
    93.    1.  
-->size(eqMat)
 ans  =
    96.    93.  
-->size(eqRhs)
 ans  =
    96.    1.  
-->size(ineqMat)
 ans  =
    3.    93.  
-->size(ineqRhs)
 ans  =
    3.    1.  
-->size(ub)
 ans  =
    93.    1.  
-->size(lb)
 ans  =
    93.    1.  

The problem may be related to the fact that there are more equality constraints 
(i.e. 96) than unknowns (i.e. 93). But it seems that only 81 of the 96 rows of 
the equality matrix are numerically linearly independent :

-->rank(eqMat)
 ans  =
    81.  

There are no such rank defficient tests neither for karmarkar, nor for linpro. 
Actually, there were no unit test at all for linpro until June 2011... But I 
expect that linpro is more robust in general, so I am not surprised by the 
result. But karmarkar does not seem to work here, and returns with the exitflag 
equals to -1, meaning that the initial guess x0 could not be found. More testing 
should be done to create a simpler rank defficient linear problem with, say 4-5 
unknowns and see what happens. Do you have such a simple example and its exact 
solution ?

When you say that you have problems when you use linpro through the Java 
interface, what do you mean exactly ? Can you provide a script ?

Regards,

Michaël Baudin





More information about the users mailing list