Home > metabolic-economics > metabolic-economics-utils > cbaf2.m

cbaf2

PURPOSE ^

constraints for EBA and CBA

SYNOPSIS ^

function [C, Ceq] = cbaf2(x,p)

DESCRIPTION ^

 constraints for EBA and CBA 
 [C, Ceq] = cbaf2(x,p)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [C, Ceq] = cbaf2(x,p)
0002 
0003 % constraints for EBA and CBA
0004 % [C, Ceq] = cbaf2(x,p)
0005 
0006 C = [ x(p.ind_v) .* x(p.ind_dmu) + p.epsilon; ...
0007     - x(p.ind_v) .* x(p.ind_y)   + p.epsilon ];
0008 
0009 % no EBA constraints where v = 0
0010 
0011 C(find(x(p.ind_v)==0)) = -1;
0012 
0013 % no CBA constraints where v = 0
0014 
0015 C(find(x(p.ind_v)==0) + length(p.ind_v))=-1;
0016 
0017 Ceq     = [];

Generated on Fri 12-Feb-2016 20:18:22 by m2html © 2003