Using LP for calculating minimum costs to reach goal

Problems with modeling
Post Reply
gamsusr
User
User
Posts: 1
Joined: 2 years ago

Using LP for calculating minimum costs to reach goal

Post by gamsusr » 2 years ago

Hey,

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!

Post Reply