我有一个具体的问题,我会深表谢谢任何帮助。AMPL相关系数
我正在研究AMPL(一种数学编程语言)的具体项目: 我需要实现一个目标函数,该函数可以将变量的成本风险降到最低,其成本作为参数,相关系数为好。
使用成本差异来估计风险,我有我的相关矩阵数据。 我的相关矩阵如下所示: 相关系数(%)
煤汽轮机燃气燃气轮机风中环光伏水电非抽核GenIII核GenIV煤炭汽轮机CCS
1 0.47 0 0 0 0.12 0.12 1煤汽轮机
0.47 1 0 0 0 0.06 0.06 0.47气体燃烧涡轮
0 0 1 0 0 0 0 0风
0 0 0 1 0 0 0 0环光伏
0 0 0 0 1 0 0 0水电非泵送
0.12 0.06 0 0 0 1 1 0.12核GenIII
0.12 0.06 0 0 0 1 1 0.12核GenIV
1 0.47 0 0 0 0.12 0.12 1煤汽轮机CCS
就我而言,我希望尽量减少成本的风险是燃油价格(燃料类型相关系数和相关系数每年都会变化,燃料价格取决于技术类型,省份和年份)。
我需要找到一种方法来找到一个有效的方法来在表(psgAdmin(psql)上的数据库)中输入相关矩阵,然后使用适当的参数来读取它们,并在我的目标函数上实现它们。
是我到目前为止的表看起来像这样:
table fuel_prices "inputs/fuel_prices.tab" IN:
[province, fuel, year], fuel_price, cv_fuel_price;
read table fuel_prices;
我需要修改它添加的相关系数。
# Table for the correlation coefficients
# table fuel_prices_corr "inputs/fuel_prices_corr.tab" and IN:
# [province, year], fuel, correl_coeff1, correl_coeff2;
# read table fuel_prices_corr;
我使用的技术从表提取为执行以下操作: 表generator_info “输入/ generator_info.tab” IN:
TECHNOLOGIES < - [技术],technology_id,燃料; 阅读表generator_info;
table gen_cap_cost "inputs/gen_cap_cost.tab" IN:
[technology, year], overnight_cost_yearly ~ overnight_cost, fixed_o_m_yearly ~ fixed_o_m, variable_o_m_yearly ~ variable_o_m;
read table gen_cap_cost;
table existing_plants "inputs/existing_plants.tab" IN:
EXISTING_PLANTS <- [project_id, province, technology],
ep_plant_name ~ plant_name, ep_carma_plant_id ~ carma_plant_id,
ep_capacity_mw ~ capacity_mw, ep_heat_rate ~ heat_rate, ep_cogen_thermal_demand ~ cogen_thermal_demand_mmbtus_per_mwh,
ep_vintage ~ start_year,
ep_overnight_cost ~ overnight_cost, ep_connect_cost_per_mw ~ connect_cost_per_mw, ep_fixed_o_m ~ fixed_o_m, ep_variable_o_m ~ variable_o_m,
ep_location_id;
read table existing_plants;
table new_projects "inputs/new_projects.tab" IN:
PROJECTS <- [project_id, province, technology], location_id, ep_project_replacement_id,
capacity_limit, capacity_limit_conversion, heat_rate, cogen_thermal_demand, connect_cost_per_mw;
read table new_projects;
我的目标函数是这样的:PID =项目的具体编号,一个=省,T =技术,P =期,投资周期的开始,以及当发电厂开始运行之日起, h =学习时间 - 考虑独特的时间点,p =投资期。
总和{(PID,A,T,P)中PROJECT}根[PID,A,T,P,H] * fuel_cost [PID,A,T,P))
没有人有请提供一个提示,或使用MPT和相关变量的项目?