SpineOpt.jl icon indicating copy to clipboard operation
SpineOpt.jl copied to clipboard

Is there a difference between using fix_in_out ratio compared to fix_out_in if the value is 1?

Open manuelma opened this issue 1 year ago • 7 comments

There shouldn't be a difference, but I suspect there might be a mistake in the current implementation which causes different results depending on whether the user specifies in_out or out_in. Need to confirm, this issue is just a placeholder for when I find time to look into it.

manuelma avatar May 03 '23 09:05 manuelma

I don't see any difference. And there wouldn't be a difference between in_out 2 and out_in 0.5 either, right? But is this an issue? I do find in_out/out_in confusing, but that's a separate discussion.

jkiviluo avatar Jun 02 '23 09:06 jkiviluo

I updated the description, sorry it wasn't clear at all...

manuelma avatar Jun 02 '23 09:06 manuelma

Don't forget that the [min/max/fix]_ratio_[in/out]_[in/out] also have associated [min/max/fix]_ratio_[in/out]_[in/out]_units_on_coefficient and in that case, it changes what side of the constraint the units_on term appears

DillonJ avatar Jun 02 '23 10:06 DillonJ

Good point @DillonJ I updated the title this time, so the suspicion is only for the 'fix' case.

manuelma avatar Jun 02 '23 10:06 manuelma

@manuelma there is also a difference in the fix case as the units_on coefficient will effectively have a different sign depending on whether it is in/out or out/in

DillonJ avatar Jun 02 '23 10:06 DillonJ

So to be more precise - the fix_ratio_out_in_unit_flow and fix_ratio_in_out_unit_flow are equivalent if they are both 1 and fix_units_on_coefficient_in_out and fix_units_on_coefficient_out_in are both zero

If fix_units_on_coefficient_in_out or fix_units_on_coefficient_out_in are non-zero, they are not equivalent, even if the fix_ratio value is 1

DillonJ avatar Jun 02 '23 10:06 DillonJ

@manuelma Is this still an issue or did you figure it out?

clizbe avatar Jan 23 '24 13:01 clizbe