Page 1 of 1

Using LP for calculating minimum costs to reach goal

Posted: Sun Jun 25, 2017 6:34 pm
by gamsusr

I've started using Gams a few days ago and I don't know how to solve this problem:

I want to use LP to calculate the minimum costs to reach the goal.

Goal: 15
MaxA: 20 CostsA:1
MaxB: 100 CostsB:10

The goal can be reached with A and/or B
In this case the answer should be 15 because A is bigger than the goal and cheaper than B.

I've tried something like that:

Code: Select all

Costs.. z=e= sum(t, goal * cost);
Calc1.. goal=l= maxA + maxB;
Calc2.. cost=e= costsA + costsB;
How can I solve this problem in Gams?
Thanks a lot!