Skip to main content

Hello guys! I have a bit of a problem, I am working in a model that includes Gross Cash Flows (in the model defined as Variables, V_GrossCashFlow), which can be positive or negative of course. If the Gross Cash Flows are positive, then a Tax Rate should be applied to them, resulting in Net Cash Flows (V_NetCashFlow). If the Gross Cash Flows are negative, then Net Cash Flow will just be equal to the Gross Cash Flow. For the V_Net Cash Flow variable I am using a definition such as the following:

if (V_GrossCashFlow(tr) > 0 €]) then
    V_GrossCashFlow(tr) * (1 - P_TaxationRate)
else
    V_GrossCashFlow(tr)
endif;

The obvious problem with this is that the model goes from being LP to NLP. I was wondering if you guys had any idea to model this situation without introducing Non-Linearity. I have tried using binary variables a bit, but every solution I can find with them forces me to define the binary variable using V_GrossCashFlow anyway, so the model is still Non-Linear.

I would be very thankful if anyone had any possible way to go about it.

 

Many thanks in advance!

Hi @Baste. I assume that P_TaxationRate is a number between 0 and 1. If the model (indirectly) maximizes V_NetCashFlow then you can use the following. Introduce two nonnegative variables V_GrossCashFlowPos and V_GrossCashFlowNeg, and define V_GrossCashFlow as:

Variable V_GrossCashFlow {
Range: free;
Definition: V_GrossCashFlowPos - V_GrossCashFlowNeg;
}

Then V_NetCashFlow can be defined as:

Variable V_NetCashFlow {
Range: free;
Definition: V_GrossCashFlowPos * (1 - P_TaxationRate) - V_GrossCashFlowNeg;
}

If the model (indirectly) maximizes V_NetCashFlow then either V_GrossCashFlowPos or V_GrossCashFlowNeg will be 0.

 

This is not sufficient if the model (indirectly) minimizes V_NetCashFlow because then V_GrossCashFlowPos and V_GrossCashFlowNeg both will be non-zero, resulting in an incorrect value for V_NetCashFlow. In that case a new binary variable V_Bin is needed to enforce that V_GrossCashFlowPos and V_GrossCashFlowNeg cannot both be non-zero. This binary variable is then used in two new constraints:

Constraint c1 {
Definition: V_GrossCashFlowPos <= M * V_Bin;
}
Constraint c2 {
Definition: V_GrossCashFlowNeg <= M * (1 - V_Bin);
}

Here ‘M’ is some big number.


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator