Code Monkey home page Code Monkey logo

fossee / fossee-optimization-toolbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harpreetrathore/fossee-optimization-toolbox

2.0 20.0 20.0 18.2 MB

Open source optimization toolbox for Scilab. Provides interfaces to various open-source optimization solvers so that they can be called from Scilab.

Home Page: http://www.scilab.in/fossee-scilab-toolbox/optimization-toolbox

License: Eclipse Public License 2.0

Scilab 72.04% C++ 25.79% C 1.79% XSLT 0.11% Inno Setup 0.26%

fossee-optimization-toolbox's Introduction

FOSSEE Optimization Toolbox for Scilab 6.0.x and above

A toolbox that provides mixed-integer programming, quadratic programming and nonlinear programming tools in Scilab through various open-source libraries available from Coin-OR.

NOTE: On linux systems with gfortran8 as the default version, the user will need to install libgfortran4 for the toolbox to load. This can be done, for example in Ubuntu, by executing: sudo apt-get install libgfortran4

To Download

  1. [Visit the link http://atoms.scilab.org/toolboxes/FOT/]
  2. Select the linux or windows version as per your platform.
  3. Extract the files.

To use

  1. In Scilab, change the working directory to the root directory of the repository
  2. Run exec loader.sce in the scilab console.
  3. The Toolbox is now ready, to see help type help in console.
  4. The demos are available in Demos folder.
  5. To run a demo type exec <name of function>.dem.sce
  6. Test cases are available in tests folder.

To build from source

  1. The source code has the thirdparty folder missing. This folder contains the pre-built optimization libraries for windows and linux

  2. Download the thirdparty folder for your OS from https://scilab.in/fossee-scilab-toolbox/optimization-toolbox/download-pre-built-optimization-library and paste it in the toolbox directory

  3. Then type exec builder.sce in the scilab console to run the builder. {Prerequisites: In windows you need MinGW installed along with its toolbox. See https://atoms.scilab.org/toolboxes/mingw/8.3.0 and Step 0,1,2 of https://github.com/FOSSEE/FOSSEE-Optimization-toolbox/blob/Scilab-6/doc/INSTALL.mingw }

  4. If you are using Windows, after you build the toolbox successfully, follow instructions given in https://github.com/FOSSEE/FOSSEE-Optimization-toolbox/blob/Scilab-6/doc/windows.edits

  5. Now run exec loader.sce in the scilab console. The toolbox will be ready to use.

    This toolbox consists of open-source solvers for a variety of optimization problems: CLP for linear and quadratic optimization, CBC for integer linear optimization, IPOPT (with MUMPS) for nonlinear optimization, and BONMIN for integer nonlinear optimization.

Features

  • fot_linprog: Solves a linear optimization problem.

  • fot_intlinprog: Solves a mixed-integer linear optimization problem in intlinprog format with CBC.

  • fot_quadprog: Solves a quadratic optimization problem.

  • fot_quadprogmat: Solves a quadratic optimization problem (with input in Matlab format).

  • fot_quadprogCLP: Solves a quadratic optimization problem.

  • fot_intquadprog: Solves an integer quadratic optimization problem.

  • fot_lsqnonneg: Solves a nonnegative linear least squares optimization problem.

  • fot_lsqlin: Solves a linear least squares optimization problem.

  • fot_lsqnonlin: Solves a nonlinear least squares optimization problem.

  • fot_fminunc: Solves an unconstrained optimization problem.

  • fot_fminbnd: Solves a nonlinear optimization problem on bounded variables.

  • fot_fmincon: Solves a general nonlinear optimization problem.

  • fot_fgoalattain: Solves a multiobjective goal attainment problem.

  • fot_fminimax: Solves a minimax optimization problem.

  • fot_intfminunc: Solves an unconstrained mixed-integer nonlinear optimization problem.

  • fot_intfminbnd: Solves a mixed-integer nonlinear optimization problem on bounded variables.

  • fot_intfmincon: Solves a constrained mixed-integer nonlinear optimization problem.

  • fot_intfminimax: Solves a mixed-integer minimax optimization problem.

fossee-optimization-toolbox's People

Contributors

adarshshah avatar animeshbaranawal avatar ashutoshmahajan avatar georgeyj avatar harpreetrathore avatar jrgjon avatar kpjoshi avatar naveen2307 avatar osmium8 avatar rupakrokade avatar sharvani2002 avatar siddharth11235 avatar siddiqui-ilma avatar yasaalirizvi avatar yashkataria avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fossee-optimization-toolbox's Issues

libgfortran3 required to load toolbox on ubuntu

We would prefer that the toolbox be capable of loading independently without requiring external installations. Currently on Ubuntu systems, we must apt-install libgfortran3 separately even to load the toolbox.

intquadprog crashes on infeasible problems

void QuadTMINLP::finalize_solution(TMINLP::SolverReturn status, Index n, const Number* x,Number obj_value)
{
finalX_ = (double*)malloc(sizeof(double) * numVars_ * 1);
for (Index i=0; i<n; i++)
{
finalX_[i] = x[i];
}
finalObjVal_ = obj_value;
status_ = status;
}

When we try to solve infeasible problems in intquadprog, it crashes while in the FinaliseSolution method.

unit tests

Latest FOT builds (Scilab-6 branch) are failing all unit tests. After loading the toolkit, run

test_run('./')

For each test we get a warning:
WARNING: option "JVM NOT MANDATORY" is deprecated, please use "CLI SHELL MODE" instead

and errors:
Slave Scilab exited with error code 1

Integer Constraints Not Working

I was trying to use the FOT for linear programming problem with integer constraints, as the build in function Scilab is only meant for floating I think, I face following issue:

A = [-40 0 0 1 0 0 ; 0 -60 0 0 1 0 ; 0 0 -85 0 0 1 ; 0 0 0 -1 -1 -1];
B = [0 0 0 -750]';
C = [200 275 325 1.5 1.8 1.9]';
lb = [1 1 1 1 1 1]';
ub = [8 5 3 840 560 3*85]';
[xopt,fopt,exitflag,iter,yopt]=karmarkar([],[],C,[],[],[],[],[],A,B,lb,ub)
disp(xopt);
4.8766469
4.9990788
2.999906
195.06523
299.94403
254.99124

xopt = intlinprog(C,[1 2 3 4 5 6]',A,B,[],[],lb,ub)
disp(xopt);
4.875
5.
3.
195.
300.
255.

first 6 numbers are the optimised value using standard Scilab function, which is the floating point, while using he FOT with integer constraints, I expect to get the output all in integer, however, I get x(1) is 4.875.

Any advice? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.