Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only

Read constraints from a file

  • 1.  Read constraints from a file

    Posted 11/26/08 06:51 PM

    Originally posted by: SystemAdmin


    [ncasti said:]

    Hi,
    in the "ILOG Solver User's Manual, Chapter 26: Combining Complete and Local Search: Locating Warehouses" is shown how to read some int data from a file and assign it to an IloInt or IloIntArray.

    Could it be possible to read a Constraint from a file?
    Not a difficult one, just something as [b]x+y==17[/b] or [b]x-y==5[/b]
    Lets suppose an IloIntVar x, IloIntVar y and IloModel model have been previously created. [color=red][/color]
    Now I create an ifstream to read some *.txt file and each line of the file has one "simple" constraint.

    Can I use [font=Verdana]ifstream >> IloExtractable object, IloConstraint object, IloRange object, IloNumExprArg object[/font] ?

    Thank you very much for your help.

    Nacho Castiñeiras




    #ConstraintProgramming-General
    #DecisionOptimization