Programming question about setting constraints and objectives
I'm just starting on this Gurobi journey in .Net, so these are newbie questions.
I'm just looking for some advice here. We are going to create a wrapper class for Gurobi and expose just a few methods, like AddVar, SetObjective, etc. A minimalist set for the time being. My question is on SetObjective and AddConstr. The end users will be doing their modeling in VB.Net. So it would be something like this:
Dim x as Double
Dim y as Double
Dim z as Double
Dim myGurobi as new GurobiWrapper
myGurobi.SetEnvironment(true)
myGurobi.CreateModel()
So I'm thinking would this be something like popping items off a stack or doing a parsing exercise?
Would it be something like:
myGurobi.AddVar(x)
myGurobi.AddOperator(*)
myGurobi.AddVar(y)
Obviously, the end users would have to add things in this order.
Dim objArray() as String = {"x","*","y"}
Or perhaps something like myGurobi.SetObjective(objArray), where you would loop over the array and then build the objective. Is it possible to build the objective or the constraints from these variables?
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
Post is closed for comments.
Comments
1 comment