Try our new documentation site (beta).


ScenNObj

Type: double
Modifiable: Yes

When the model has multiple scenarios, this attribute is used to query or modify changes of the variable objective coefficients in scenario <span>$</span>n<span>$</span> w.r.t. the base model. You set <span>$</span>n<span>$</span> using the ScenarioNumber parameter.

If an element of this array attribute is set to the undefined value (GRB_UNDEFINED in C and C++, or GRB.UNDEFINED in Java, .NET, and Python), it means that the corresponding value in the scenario is identical to the one in the base model.

The number of scenarios in the model can be queried (or modified) using the NumScenarios attribute.

Please refer to the Multiple Scenarios discussion for more information.

For examples of how to query or modify attributes, refer to our Attribute Examples.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search

Gurobi Optimization