Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 581843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:37:24+00:00 2026-05-13T14:37:24+00:00

Is it possible to use the MSF api to specify a variable as semi-integer

  • 0

Is it possible to use the MSF api to specify a variable as semi-integer (V = 0, or a <= V <= b)?

The following is an example in LP_Solve that uses the “sec” and “int” keywords to indicate the variables are semi-continuous and integer.

max: 0.5 Q1 + 0.55 Q2 ;

Q1 >= 5;
Q1 <= 10 ;
Q2 >= 5;
Q2 <= 10;
Q1 + Q2 <= 10;

sec Q1,Q2 ;
int Q1,Q2 ;

Something similar in MSF would be nice. I note that it is possible to call a Gurobi Plugin DLL within MSF however I cannot find any place in that api to be able to set the type of the variable correctly (I think Gurobi calls it the VTYPE), so I assume it is either not exposed in their .net api or not available in the version of Gurobi that MSF uses? Alternatively, is there a nice way to call LP_Solve from .NET?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:37:25+00:00Added an answer on May 13, 2026 at 2:37 pm

    You can do this with Solver Foundation but there is no equivalent for the “sec” keyword. Instead you can add a dummy 0-1 decision for each semi-integer variable. For your original example involving “V”, here’s how you could do it in OML:

    Model[
      Decisions[
        Integers[0, 1],
        VPositive
      ],
      Decisions[
        Reals,
        V
      ],
      Constraints[
        constraint -> 10 * VPositive<= V <= 20 * VPositive
      ]
    ]
    

    If you are using the Solver Foundation API then you would add the analagous decisions, constraints, goals using the object model. The way to specify the type of a decision is using a Domain, provided in the ctor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 495k
  • Answers 495k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Just call file_get_contents on the url in question instead of… May 16, 2026 at 11:24 am
  • Editorial Team
    Editorial Team added an answer Fiddler shouldn't care what framework you're using; it listens to… May 16, 2026 at 11:24 am
  • Editorial Team
    Editorial Team added an answer Surely if you switched to using DBD::Sybase instead of Sybase::DBLib… May 16, 2026 at 11:24 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have recently started looking into Google Charts API for possible use within the
Recently I asked a question on SO that had mentioned the possible use of
Is it possible to use an object as a hash key? For example, the
Is it possible use mod_rewrite to resolve addresses hosted on another server? Say I
what could be a possible use of declaring types within a namespace but not
How can I (if it is possible) use the Prototype library to loop through
I have reviewed DashCommerce, nopCommerce and DotShoppingCart for possible use and all of them
Possible Duplicate: Use of var keyword in C# Which declaration should be accepted ?
Is it possible to use style for .net winform control ?
Is it possible to use CriteriaQuery with JPA 1.0. I guess JPA 2.0 not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.