A toolbox that provides quadratic programming in Scilab through Ipopt library.
- Follow these instructions provided in IPOPT documentation to download and install.
- Clone this repository on your computer or download this repository in .zip format and extract it.
- Note the path to header files & libraries of IPOPT.
In my computer : header files can be found in/home/saikiran/Ipopt-3.12.3/include/coin
Libraries can be found in/home/saikiran/Ipopt-3.12.3/lib
- Go to extracted folder (of this toolbox), open
builder.sce
. - Set values of
INCLUDE_PATH
,LIBRARIES_PATH
andgpp
properly using step 3. - Open Scilab software.
- Change
pwd
(present working directory) to toolbox folder. - Execute
exec builer.sce
in Scilab. - If you got any errors ,please make sure that you followed step 3 and 5.
- Execute
exec loader.sce
in Scilab. - If you got any errors ,please make sure that you followed step 3 and 5.
- If you successfully completed this far, your installation is successful.
- Jump to step 3 of next section.
-
Whenever you want to use this toolbox.
-
Just go to toolbox directory and run
exec loader.sce
.(No need to runexec builder.sce
) -
You can call
solveQpprob
with necessary arguments to solve a problem.
E.g.
minx'
Q
x
+P'
x
s.t
cL'
<=C
x'
<=cU'
xL
<=x'
<=xU
Here, `x` is a *column-vector* of variables. `Q` is a *square* matrix of co-efficients of quadratic terms of objective. `P` is a *row-vector* of co-efficients of linear terms of objective. `cL` and `cU` are *row-vectors* of lower & upper bounds of all constraints . `C` is a `m X n` matrix with each row as co-efficients of variables in each constraint. `m` and `n` are *no.of constraints* and *no.of variables* respectively. `xL` and `xU` are *row-vectors* of lower & upper bounds of all variables .
-
solveQpprob(n,m,Q,P,C,cL,cU,xL,xU)
will solves and prints the result on Scilab console. -
You can refer
testScript.sce
for examples and runexec testScript.sce
to test those examples.