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

cbaf2w

PURPOSE ^

constraints for EBA and CBA

SYNOPSIS ^

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

DESCRIPTION ^

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

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