-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enumerating OptionRecord
s using C API
#1114
Comments
By "number of parameters", do you mean the number of options? I've searched for Creating a method in the C API to achieve what you want won't be difficult. I'll get on with it this weekend Note that there are some methods in the C++ API that are for internal use only, so shouldn't be in the C API. I'll see what you've put in your PR - please make this to |
Indeed those Gurobi functions seem to appear in the headers but apparently aren't documented anywhere. The functions we use for Gurobi have these signatures: int GRBgetnumparams(GRBenv *env);
int GRBgetparamname(GRBenv *env, int i, char **paramnameP);
int GRBgetparamtype(GRBenv *env, const char *paramname);
int GRBgetintparaminfo(GRBenv *env, const char *paramname, int *valueP, int *minP, int *maxP, int *defP);
int GRBgetdblparaminfo(GRBenv *env, const char *paramname, double *valueP, double *minP, double *maxP, double *defP);
int GRBgetstrparaminfo(GRBenv *env, const char *paramname, char *valueP, char *defP); Thanks, I'll make sure I target the |
Thanks, I'll match these methods |
The methods are written and sitting in the It would be good if you (@cyderize) could let me know how they are to work with. |
The bug exposed on Windows has been fixed, and the |
Great, I tried the new functions in the Thanks! |
Thanks. We've tried to mimic Gurobi when we needed inspiration - so we could always quote Gurobi if anyone demurred. We picked up on their string-named options (parameters) years ago - but missed the details of the methods you've brought to out attention, so thanks. 🙂 |
Hi, I'm in the process of converting MiniZinc's new HiGHS interface to use the C API rather than the C++ API (this way we can turn it into a plugin which dynamically loads the HiGHS library at runtime).
However, there are a few C++ APIs which are not available using the C interface. Most of these I've been able to easily add in my fork (I'll open a pull request soon).
We need to be able to get all of the available options, so that we can generate a GUI for setting the options from the MiniZinc IDE. Currently in C++, we loop through the
records
field ofHighsOptions
, but I'm not entirely sure what an API for accessing these records in C should look like (we need access to the default values and bounds of the options).Gurobi provides
GRBgetnumparams
andGRBgetparamname
to get the number of parameters, and then get the name from the index. Perhaps something similar could be done here, with additional functions to access the descriptions, default values, and bounds of options.The text was updated successfully, but these errors were encountered: