A Simple First GAMS Model

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.พ. 2025
  • Part One of the GAMS Introductory Video Series
    In this video will look at a simple first GAMS model about vintage cars and trucks.
    Components: variables, equations, model and solve statement
    Concepts: scaling, variable bounds, .lst file, .gdx file

ความคิดเห็น • 7

  • @GAMSLessons
    @GAMSLessons  6 ปีที่แล้ว +1

    That depends very much on the model type and solver used. For LP/MIP and first rate LP/MIP solvers like Cplex, Xpress, ... I would say that it really does not matter. In the presolve this should be handled either way. If the variable can be "culled" then the presolver needs to find out that the =l= constraint is never binding hence becomes free and can be substituted but the same would hold for a variable with a .up bounds. I would be surprised to see much differences in performance between the =l= constraint and the .up bound. With non-linear models this is different. NLP solvers obey variable bounds strictly (no tolerance) while they have a tolerance on constraints. So if you have a variable x and you take the log of this in some expression (i.e. log(x)) you want to bound this away from 0. If you do x =g= 1e-6 and the solver feasibility tolerance is 1e-6 then you still can get into trouble. If you do x.lo=1e-6 the solver will not violate the bound. Moreover, NLP solvers do not do as much preprocessing as LP/MIP solvers, so bounds are also better than simple bound constraints. On the other hand, if you have variables that automatically take positive values, you might not want to define them as positive variable or assign an explicit bound, because the preprocessor might not figure this out and prevent the substitution. All in all if you need to set an upper or lower bound do it with .lo/.up rather than constraints, but only do it if necessary.

  • @andrewfreestuff
    @andrewfreestuff 6 ปีที่แล้ว +1

    Is always using x.up better than defining a constraint instead? It was a while ago now, but I seem to recall that we had really large models (10-20Gb) and using .up rather than a constraint prevented (for some reason) the solver from culling out variables during the presolve. Switching from .up to constraints made a huge improvement. Not sure it that was an old problem or a solver problem, but would be interested to know if using .up is now considered the best option in all cases.

  • @Ali_Esmail
    @Ali_Esmail 4 ปีที่แล้ว

    Can you show us how to code a nonlinear programming problem using GAMS? Please it would be very helpful.

  • @sanaloukil1811
    @sanaloukil1811 5 ปีที่แล้ว +1

    HI can we use GAMS to solve MDPs please???

  • @marincordeleanu7649
    @marincordeleanu7649 ปีที่แล้ว +1

    Why would anyone choose to maximize revenue over profit?

    • @akshayuppala9295
      @akshayuppala9295 5 หลายเดือนก่อน +1

      Tech Startups are not profitable from the beginning. So they need to show to their investors that their revenue is increasing even if they are still not profitable. They might choose to Maximize revenue over profit.