cog-imperial / suspect

Special Structure Detection for Pyomo
https://cog-imperial.github.io/suspect/
Apache License 2.0
26 stars 5 forks source link

The value of abs_eps and rel_eps #11

Open ZedongPeng opened 3 years ago

ZedongPeng commented 3 years ago

I tried a lot of examples with the detect_special_structure function. In most cases, it works well. However, some cases failed. The main reason is the value of abs_eps in the intersect function in fbbt. The failed examples are {'4stufen', 'bchoco06', 'bchoco07', 'bchoco08', 'beuster', 'chp_partload', 'contvar', 'ex3pb', 'forest', 'ghg_1veh', 'ghg_2veh', 'ghg_3veh', 'hda', 'heatexch_gen1', 'heatexch_gen2', 'heatexch_gen3', 'minlphix', 'super1', 'super2', 'super3', 'super3t', 'tanksize', 'uselinear'} here

In some examples, the gap between new_lower and new_upper is greater than 1e-6 but still very small. For example, the gap of 4stufen is 1.13e-05. However, for some examples, the gap is very big. For example, the gap of bchoco06 is 99990.0.

I am not quite familiar with fbbt, so I am not sure if there is a bug here. Any suggestions for the value of abs_eps and rel_eps?

btw, the oil example contains log10 function, which is not supported by suspect now. Is there any plan to extend the supported function?

Thanks.

fracek commented 3 years ago

I will look into it this week.

Suspect does not support log10 but I will add it.

fracek commented 3 years ago

I updated the package to version 2.1 on Pypi, it adds log10 (tested on oil and oil2) and fixes the bug you reported on some instances. Unfortunately, bchoco{06,07,08}, hda, and super{1,2,3} still have this issue so I won't be closing it for now.

ZedongPeng commented 3 years ago

I updated the package to version 2.1 on Pypi, it adds log10 (tested on oil and oil2) and fixes the bug you reported on some instances. Unfortunately, bchoco{06,07,08}, hda, and super{1,2,3} still have this issue so I won't be closing it for now.

Thank you a lot.

ZedongPeng commented 3 years ago

Hey Francesco, recently I tied the latest version of suspect. Here are still some examples failing. {'4stufen', 'bchoco06', 'bchoco07', 'bchoco08', 'beuster', 'casctanks', 'chp_partload', 'contvar', 'ex1224', 'gkocis', 'hda', 'heatexch_gen1', 'heatexch_gen2', 'heatexch_gen3', 'oaer', 'st_e29', 'super1', 'super2', 'super3', 'super3t', 'supplychainp1_020306', 'supplychainp1_030510', 'supplychainr1_020306', 'supplychainr1_030510', 'tanksize', 'tspn05', 'tspn08', 'tspn10', 'tspn12'}

I am wondering, is there any plan to further improve this project recently? If not, I will skip the above examples for now. Thanks.

fracek commented 3 years ago

Thanks for the report, this week I will take a look at it.