Skip to content

[FEATURE] Rounding of small values to 0 #29

@dqpinel

Description

@dqpinel

Motivation

Some values are very small and cause numerical problems while solving

Feature Description

Some values are very small and cause numerical problems while solving.
Example in EnVis_Green:
TradeLossFactor of Gas_Natural -> 9.45e-7, H2 ->5e-6, Power 3e-5
Residual_Capacity, FRT_Rail_Conv-CH-2040 -> 4e-5
Another example are RHS values for constraint OC2 for HMHI_Steam_Electric where a residual capacity gets multiplied with the Fixed cost resulting in values in the 1e-6 range.

This might not affect GAMS, as I think it automatically rounds to 0 everything that is too small. However in julia, the data is read as is, causing a very big matrix range and numerical instability.
It could be preferable to find out the internal threshold in GAMS and apply to the data during the processing to even out the behaviours across the versions.

Even better would be an individual threshold that could be set for each parameter defining the minimum possible values (other than 0) to improve the numerical stability while keeping the details where they are necessary, for instance when numbers end up getting multiplied by something large like the trade loss factors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions