Esempio n. 1
0
 //CTOR for solution table writing
 public Modeler(Int32 Scenario, AllModelData ModelData, ModelingParameters TableSelection, Cplex cplex)
 {
     tableSelection = TableSelection;
     scenario       = Scenario;
     theData        = ModelData;
     theModel       = cplex;
 }
Esempio n. 2
0
        //CTOR to build final Linear Model
        public Modeler(AllModelData LinearModel, ModelingParameters modelTableSelection, Cplex cplex, Int32 TrailerCapacity)
        {
            trailerCapacity = TrailerCapacity;
            theModel        = cplex;
            tableSelection  = modelTableSelection;
            inputrecs       = GetLPInputRecordCount();
            scenario        = LinearModel.ModelData.ElementAt(0).Value.ScenarioID;
            EmptyMoves      = new INumVar[inputrecs];
            LoadedMoves     = new INumVar[inputrecs];
            TrailerTurns    = new double[inputrecs];
            LaneCost        = new double[inputrecs];
            LaneRevenue     = new double[inputrecs];
            LaneMargin      = new double[inputrecs];

            //NEED TO WRITE PREVIOUS SOLUTION TO INTERIM TABLE.
            ClearTable(tableSelection.InterimSolutionInputTable);
            PopulateSolution(modelTableSelection.InterimSolutionInputTable);
            BuildLPInputData(tableSelection.Minimum_Lane_Volume);

            //NEED TO REBUILD MODEL BASED UPON NON-LINEAR SOLUTION
            AddObjective();
            AddBalanceConstraint();
            AddCapacityConstraint();
        }