Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  general functions

    Posted 05/27/09 07:24 PM

    Originally posted by: SystemAdmin


    [shadi said:]

    hello,
    how i can write all my general functions in extra model and to use these functions inside my main model???
    i want to do that becuase my main model became very big and i want to divide it into models....


    thanks in advanced
    shadi
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: general functions

    Posted 06/22/09 07:10 PM

    Originally posted by: SystemAdmin


    [afleischer said:]

    Hi,

    maybe you could use the include keyword.

    Let me give you an example.

    You write your main block in main.mod


    include "sub.mod";

    main
    {
    writeln(A(2));
    }



    and in sub.mod

    you have


    execute
    {
    function A(x)
    {
    return 2+x;
    }
    }


    The displayed  result will be 4

    Alex

    #DecisionOptimization
    #MathematicalProgramming-General