//
//Quadraticr planning command
//
//Quadratic planning is the method of finding a vector x
//that maximizes (minimizes) the quadratic matrix (Q) n*n + vecotr (c) n formula.
//under the following linear constraint matrix (a) n*m + vector(b) m with constraint operater.
//
//The qlp data format is arranged by quadratic formula as bellow.
//Syntax
qlp (variables) by joken ans/
(conditions)
;
//(conditions) are convergency conditions.
eps=0.xxx //xx is convargency condition
loo=nn //nn is loop max in convergency
//
//Example
get qpldatRV.csv@;
qpl x1-7 by joken ans/
eps=0.005
loop=100
;
//The result is convergency process and solved output 7 variables as following.
//
//Comform this solution is satisfied by constraint condition as bellow.
//
//get solved vector tranformed.
anaget;
transpose;
select col_1;
put ans;
view;
/**
LINES col_1
1 0.254263
2 -1.090413
3 -0.097543
4 0.4959
5 -0.362346
6 0.375076
7 1.416279
**/
//Get constraint matrix (a) n*m from inputed data;
get qpl8RV.csv@;
select id x1-7;
if(id == "a") outrec;
//Multi solved vector x with constraint (a) for (a)(x).
mxmult x1-7 by ans;
put ans1;
//Compare multiplied (a)(x) and (b) for satisfaction of constraint value.
get qpl8RV.csv@;
if(id == "a") outrec;
select joken ans;
put inp;
get ans1;
//Concatinate (a)(x) and (b) for comparison.
merge inp by #;
view;
/**
LINES col_1 joken ans
1 1.778153 > 0.854345
2 0.731640 = 0.731639
3 0.639819 < 0.639819
4 0.359064 < 0.876184
5 0.260682 < 0.218167
**/