Selecting Variables for Aircraft Under-Utilization

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Selecting Variables for Aircraft Under-Utilization

AhmedAH
This post was updated on .
I am solving the Fleet Assignment Problem and encountering a problem in evaluating a constraint on aircraft utilisation.

set FLEETS;
set FLEET_LEGS within {f in FLEETS, c1 in CITIES, t1 in TIMES, c2 in CITIES, t2 in TIMES: c1 <> c2 and t1 <> t2};
var Fly {(f,c1,t1,c2,t2) in FLEET_LEGS} binary;
var Underutilised {f in FLEETS} >=0 ;
param idlecost{FLEETS} >=0 ;
Thresh[f] >=0 ;
Block[f] >=0 ;
.
.
subj to Aircraft_Utilisation {f in FLEETS}: Underutilised[f] =  fleet_size[f] * Thresh[f] - sum {(f,c1,t1,c2,t2) in FLEET_LEGS} Fly[f,c1,t1,c2,t2] * Block[f,c1,t1,c2,t2];

The Underutilised[f] generates both positive (under-utilised i.e. below threshhold value) and negative values (above threshold value). I wish to compute the cost of the underutilized ONLY (where the value for Uderutilised[f] is -ve, I wish the -ve value to be set to zero when computing the objective function).

Objective:  Minimize Underutilised[f]* UnderutilisedCost[f];

I could think of:-

1. Introducing a Delta value and apply in the objective function

var Delta[f in FLEETS} = 1 if Underutilised[f] >0 else Underutilised[f] = 0;

Objective:  Minimize Underutilised[f]* UnderutilisedCost[f] * Delta[f];


2. Use If-then-else Statement in the constraint and leave the objective intact i.e.

Minimize Underutilised[f]* UnderutilisedCost[f];

subj to Const1 {f in FLEETS}: X[f] = fleet_size[f] * Thresh[f];

subj to Const2 {f in FLEETS}: Y [f]= sum {(f,c1,t1,c2,t2) in FLEET_LEGS} Fly[f,c1,t1,c2,t2] * Block[f,c1,t1,c2,t2];

subj to Const3 {f in FLEETS}: if X[f] > Y[f] then Underutilised[f] = X[f]-Y[f] else Underutilised[f] = 0 ;

where
var X[f]>=0;
var Y[f]>=0 ;


3. Incorporating the If-then-Statement in the Objective

Minimize if Underutilised[f] > 0 then
              sum {f in FLEETS} (Underutilised[f] * idlecost[f]) else 0;

In all cases, the model does not work.

Please help
Reply | Threaded
Open this post in threaded view
|

[AMPL 2073] Re: Selecting Variables for Aircraft Under-Utilization

Paul A. Rubin

If the only place you are going to use Underutilised is in the
objective, you could just change the Aircraft_Utilisation constraint
to

subj to Aircraft_Utilisation {f in FLEETS}: Underutilised[f] >=
 fleet_size[f] * Thresh[f] - sum {(f,c1,t1,c2,t2) in FLEET_LEGS}
 Fly[f,c1,t1,c2,t2] * Block[f,c1,t1,c2,t2];

The solver will automatically look for the lowest feasible value of
Underutilised[f] given all other variables.  If the rhs of the
constraint is nonnegative, Underutilised[f] will be set equal to the
rhs; if the rhs is negative, the sign restriction on Underutilised
will result in Underutilised[f] being set equal to zero.

/Paul

On Nov 9, 5:32 am, AhmedAH <[hidden email]> wrote:

> I am solving the Fleet Assignment Problem and encountering a problem in
> evaluating a constraint on aircraft utilisation.
>
> set FLEETS;
> set FLEET_LEGS within {f in FLEETS, c1 in CITIES, t1 in TIMES, c2 in CITIES,
> t2 in TIMES: c1 <> c2 and t1 <> t2};
> var Fly {(f,c1,t1,c2,t2) in FLEET_LEGS} binary;
> var Underutilised {f in FLEETS} >=0 ;
> param idlecost{FLEETS} >=0 ;
> Thresh[f] >=0 ;
> Block[f] >=0 ;
> .
> .
> subj to Aircraft_Utilisation {f in FLEETS}: Underutilised[f] =
> fleet_size[f] * Thresh[f] - sum {(f,c1,t1,c2,t2) in FLEET_LEGS}
> Fly[f,c1,t1,c2,t2] * Block[f,c1,t1,c2,t2];
>
> The Underutilised[f] generates both positive (under-utilised i.e. below
> threshhold value) and negative values (above threshold value). I wish to
> compute the cost of the underutilized ONLY (where the value for
> Uderutilised[f] is -ve, I wish the -ve value to be set to zero when
> computing the objective function).
>
> Objective:  Minimize Underutilised[f]* UnderutilisedCost[f];
>
> I could think of:-
>
> 1. Introducing a Delta value and apply in the objective function
>
> var Delta[f in FLEETS} = 1 if Underutilised[f] >0 else Underutilised[f] = 0;
>
> Objective:  Minimize Underutilised[f]* UnderutilisedCost[f] * Delta[f];
>
> 2. Use If-then-else Statement in the constraint and leave the objective
> intact i.e.
>
> Minimize Underutilised[f]* UnderutilisedCost[f];
>
> subj to Const1 {f in FLEETS}: X[f] = fleet_size[f] * Thresh[f];
>
> subj to Const2 {f in FLEETS}: Y [f]= sum {(f,c1,t1,c2,t2) in FLEET_LEGS}
> Fly[f,c1,t1,c2,t2] * Block[f,c1,t1,c2,t2];
>
> subj to Const3 {f in FLEETS}: if X[f] > Y[f] then Underutilised[f] =
> X[f]-Y[f] else Underutilised[f] = 0 ;
>
> where
> var X[f]>=0;
> var Y[f]>=0 ;
>
> 3. Incorporating the If-then-Statement in the Objective
>
> Minimize if Underutilised[f] > 0 then
>               sum {f in FLEETS} (Underutilised[f] * idlecost[f]) else 0;
>
> In all cases, the model does not work.
>
> Please help
> --
> View this message in context:http://www.nabble.com/Selecting-Variables-for-Aircraft-Under-Utilizat...
> Sent from the AMPL mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---