VariableArrayBuilder
Build a 1-dimensional array of variables. More...
Public Member Functions |
|
VariableArrayBuilder (C dim, xpress::objects::XpressProblem *prob) | |
Create a builder that will create a 1-dimensional array of variables with the specified dimensions. |
|
auto | toArray () -> std::vector< xpress::objects::Variable > |
Create variables as specified by this builder. |
|
template<typename I , typename Func0 , is-invocable(Func0, I) > | |
auto | toArray (Func0 makeResult, std::function< void(I, C, xpress::objects::Variable)> addResult) -> I |
Create variables as specified by this builder. |
|
auto | withLB (double newLb) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a constant lower bound for all variables. |
|
template<typename Func0 , is-invocable(Func0, double, C) > | |
auto | withLB (Func0 newLb) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a lower bound that depends on the index. |
|
auto | withLimit (double newLimit) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a constant limit for all variables. |
|
template<typename Func0 , is-invocable(Func0, double, C) > | |
auto | withLimit (Func0 newLimit) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a limit that depends on the index. |
|
template<typename Func0 , is-invocable(Func0, std::optional< std::string >, C) > | |
auto | withName (Func0 newName) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a name that depends on the index. |
|
auto | withName (std::optional< std::string > newName) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a constant name for all variables. |
|
auto | withType (ColumnType newType) -> VariableArrayBuilder< C, CIsIntegral > & |
Set the type for all variables. |
|
template<typename Func0 , is-invocable(Func0, xpress::ColumnType, C) > | |
auto | withType (Func0 newType) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a type that depends on the index. |
|
auto | withUB (double newUb) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a constant upper bound for all variables. |
|
template<typename Func0 , is-invocable(Func0, double, C) > | |
auto | withUB (Func0 newUb) -> VariableArrayBuilder< C, CIsIntegral > & |
Set a upper bound that depends on the index. |
|
Detailed Description
class xpress::VariableBuilder::VariableArrayBuilder< C, >
Build a 1-dimensional array of variables.
- Since
- 44.00
Constructor & Destructor Documentation
VariableArrayBuilder()
|
inline |
Create a builder that will create a 1-dimensional array of variables with the specified dimensions.
- Parameters
-
dim Dimension. prob The problem for which to create variables.
- Since
- 44.00
Member Function Documentation
toArray() [1/2]
|
inline |
Create variables as specified by this builder.
Examples using toArray
:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- Since
- 44.00
toArray() [2/2]
|
inline |
Create variables as specified by this builder.
Examples using toArray
:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- GeneralConstraints.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- PolygonObjects.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSets.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- Parameters
-
makeResult A function to create the (empty) return value. addResult A function to add a value to the result.
- Template Parameters
-
I Type of return value. Func0 auto () -> I
: Maps()
toI
.
- Returns
- The array of variables.
- Since
- 44.00
withLB() [1/2]
|
inline |
Set a constant lower bound for all variables.
Examples using withLB
:
- Parameters
-
newLb The lower bound for all variables created by this builder.
- Returns
- Always returns this instance.
- Since
- 44.00
withLB() [2/2]
|
inline |
Set a lower bound that depends on the index.
Examples using withLB
:
- Parameters
-
newLb The lower bound for all variables created by this builder.
- Template Parameters
-
Func0 auto (C) -> double
: Maps(C)
todouble
.
- Returns
- Always returns this instance.
- Since
- 44.00
withLimit() [1/2]
|
inline |
Set a constant limit for all variables.
A limit specifies the bounds for semi-continuous/integer variables and the limit for partial integer variables. It does not apply to variables of other types.
Examples using withLimit
:
- Parameters
-
newLimit The limit for all variables created by this builder.
- Returns
- Always returns this instance.
- Since
- 44.00
withLimit() [2/2]
|
inline |
Set a limit that depends on the index.
A limit specifies the bounds for semi-continuous/integer variables and the limit for partial integer variables. It does not apply to variables of other types.
Examples using withLimit
:
- Parameters
-
newLimit The limit for all variables created by this builder.
- Template Parameters
-
Func0 auto (C) -> double
: Maps(C)
todouble
.
- Returns
- Always returns this instance.
- Since
- 44.00
withName() [1/2]
|
inline |
Set a name that depends on the index.
Examples using withName
:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- Parameters
-
newName The name for all variables created by this builder.
- Template Parameters
-
Func0 auto (C) -> std::optional<std::string>
: Maps(C)
tostd::optional<std::string>
.
- Returns
- Always returns this instance.
- Since
- 44.00
withName() [2/2]
|
inline |
Set a constant name for all variables.
Examples using withName
:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- Catenary.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- Glidert.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- Pplan.cpp
- Pplan2.cpp
- ProductionPlanning_Index.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- RecursiveFinancialPlanning.cpp
- Sangraalind.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- Parameters
-
newName The name for all variables created by this builder. This must be std::nullopt
or a format string that will be invoked with the index as argument.
- Returns
- Always returns this instance.
- Since
- 44.00
withType() [1/2]
|
inline |
Set the type for all variables.
Examples using withType
:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQP.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- Pplan.cpp
- ProductionPlanning_Index.cpp
- Sangraalind.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- Parameters
-
newType The type for all variables created by this builder.
- Returns
- Always returns this instance.
- Since
- 44.00
withType() [2/2]
|
inline |
Set a type that depends on the index.
Examples using withType
:
- BinBurglar.cpp
- BoolVars.cpp
- Boxes02.cpp
- Capbgt2l.cpp
- CapitalBudgeting.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- ELS.cpp
- ELSCut.cpp
- ELSManagedCuts.cpp
- FacilityLocationArray.cpp
- FacilityLocationCollection.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQP.cpp
- MultipleKnapsack_Arrays.cpp
- MultipleKnapsack_Collections.cpp
- Pplan.cpp
- ProductionPlanning_Index.cpp
- Sangraalind.cpp
- TravelingSalesPerson.cpp
- Wagon.cpp
- Parameters
-
newType The type for all variables created by this builder.
- Template Parameters
-
Func0 auto (C) -> xpress::ColumnType
: Maps(C)
toxpress::ColumnType
.
- Returns
- Always returns this instance.
- Since
- 44.00
withUB() [1/2]
|
inline |
Set a constant upper bound for all variables.
Examples using withUB
:
- Boxes02.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- Glidert.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Parameters
-
newUb The upper bound for all variables created by this builder.
- Returns
- Always returns this instance.
- Since
- 44.00
withUB() [2/2]
|
inline |
Set a upper bound that depends on the index.
Examples using withUB
:
- Boxes02.cpp
- ContractAllocation.cpp
- CuttingStock.cpp
- Folio.cpp
- FolioCB.cpp
- FolioHeuristic.cpp
- FolioIIS.cpp
- FolioInit.cpp
- FolioMip1.cpp
- FolioMip2.cpp
- FolioMipIIS.cpp
- FolioQC.cpp
- FolioQP.cpp
- Glidert.cpp
- PurchasePWL.cpp
- PurchaseSOS2.cpp
- SpecialOrderedSetsQuadratic.cpp
- TravelingSalesPerson.cpp
- Parameters
-
newUb The upper bound for all variables created by this builder.
- Template Parameters
-
Func0 auto (C) -> double
: Maps(C)
todouble
.
- Returns
- Always returns this instance.
- Since
- 44.00
The documentation for this class was generated from the following file:
- xpress.hpp
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.